diff options
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/favicon.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/favicon.pm b/IkiWiki/Plugin/favicon.pm new file mode 100644 index 000000000..518d2c2ff --- /dev/null +++ b/IkiWiki/Plugin/favicon.pm @@ -0,0 +1,24 @@ +#!/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.png"); + } +} # }}} + +1 |