summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/favicon.pm
blob: 7169c58c342f9ef97defe60a1004aebab8f98555 (plain)
  1. #!/usr/bin/perl
  2. # favicon plugin.
  3. package IkiWiki::Plugin::favicon;
  4. use warnings;
  5. use strict;
  6. use IkiWiki 2.00;
  7. sub import { #{{{
  8. hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
  9. } # }}}
  10. sub pagetemplate (@) { #{{{
  11. my %params=@_;
  12. my $template=$params{template};
  13. if ($template->query(name => "favicon")) {
  14. $template->param(favicon => "favicon.ico");
  15. }
  16. } # }}}
  17. 1