clear sandbox/test commit
[ikiwiki.git] / IkiWiki / Plugin / favicon.pm
blob6060914c5a59a6736971f5557d97b3efc992d953
1 #!/usr/bin/perl
2 # favicon plugin.
4 package IkiWiki::Plugin::favicon;
6 use warnings;
7 use strict;
8 use IkiWiki 3.00;
10 sub import {
11 hook(type => "getsetup", id => "favicon", call => \&getsetup);
12 hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
15 sub getsetup () {
16 return
17 plugin => {
18 safe => 1,
19 rebuild => 1,
23 sub pagetemplate (@) {
24 my %params=@_;
26 my $template=$params{template};
28 if ($template->query(name => "favicon")) {
29 $template->param(favicon => "favicon.ico");