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