2006-09-16 02:52:26 +02:00
|
|
|
#!/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")) {
|
2006-09-16 17:12:01 +02:00
|
|
|
$template->param(favicon => "favicon.ico");
|
2006-09-16 02:52:26 +02:00
|
|
|
}
|
|
|
|
} # }}}
|
|
|
|
|
|
|
|
1
|