2 package IkiWiki::Plugin::mirrorlist;
9 hook(type => "getsetup", id => "mirrorlist", call => \&getsetup);
10 hook(type => "pagetemplate", id => "mirrorlist", call => \&pagetemplate);
13 sub getsetup () { #{{{
22 description => "list of mirrors",
28 sub pagetemplate (@) { #{{{
30 my $template=$params{template};
32 $template->param(extrafooter => mirrorlist($params{page}))
33 if $template->query(name => "extrafooter");
36 sub mirrorlist ($) { #{{{
39 (keys %{$config{mirrorlist}} > 1 ? gettext("Mirrors") : gettext("Mirror")).
44 $config{mirrorlist}->{$_}."/".urlto($page, "").
46 } keys %{$config{mirrorlist}}