2 package IkiWiki::Plugin::repolist;
9 hook(type => "getsetup", id => "repolist", call => \&getsetup);
10 hook(type => "checkconfig", id => "repolist", call => \&checkconfig);
21 example => ["svn://svn.example.org/wiki/trunk"],
22 description => "URIs of repositories containing the wiki's source",
31 if (defined $config{rcs} && $config{repositories}) {
32 $relvcs=join("\n", map {
33 s/"//g; # avoid quotes just in case
34 qq{<link rel="vcs-$config{rcs}" href="$_" title="wiki $config{rcs} repository" />}
35 } @{$config{repositories}});
37 hook(type => "pagetemplate", id => "repolist", call => \&pagetemplate);
41 sub pagetemplate (@) {
43 my $page=$params{page};
44 my $template=$params{template};
46 if (defined $relvcs && $template->query(name => "relvcs")) {
47 $template->param(relvcs => $relvcs);