X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/912521ef0711204965aa2319d41c7741bd3f4f4c..8051316904d13de3e467f01ebaeacaa5d8efb1b6:/IkiWiki/Plugin/mirrorlist.pm diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm index 216d870fd..eb273561d 100644 --- a/IkiWiki/Plugin/mirrorlist.pm +++ b/IkiWiki/Plugin/mirrorlist.pm @@ -3,12 +3,24 @@ package IkiWiki::Plugin::mirrorlist; use warnings; use strict; -use IkiWiki; +use IkiWiki 2.00; sub import { #{{{ + hook(type => "getsetup", id => "mirrorlist", call => \&getsetup); hook(type => "pagetemplate", id => "mirrorlist", call => \&pagetemplate); } # }}} +sub getsetup () { #{{{ + return + mirrorlist => { + type => "string", + default => {}, + description => "list of mirrors", + safe => 1, + rebuild => 1, + }, +} #}}} + sub pagetemplate (@) { #{{{ my %params=@_; my $template=$params{template}; @@ -25,7 +37,7 @@ sub mirrorlist ($) { #{{{ join(", ", map { qq{{$_}."/".urlto($page, ""). qq{">$_} } keys %{$config{mirrorlist}} ).