ikiwiki/IkiWiki/Plugin/favicon.pm

25 lines
393 B
Perl
Raw Normal View History

#!/usr/bin/perl
# favicon plugin.
package IkiWiki::Plugin::favicon;
use warnings;
use strict;
use IkiWiki;
sub import { #{{{
hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
} # }}}
sub pagetemplate (@) { #{{{
my %params=@_;
my $template=$params{template};
if ($template->query(name => "favicon")) {
$template->param(favicon => "favicon.ico");
}
} # }}}
1