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