summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/favicon.pm
blob: 518d2c2ff4f26ed13da55b5f73634ff0e050197c (plain)
  1. #!/usr/bin/perl
  2. # favicon plugin.
  3. package IkiWiki::Plugin::favicon;
  4. use warnings;
  5. use strict;
  6. use IkiWiki;
  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.png");
  15. }
  16. } # }}}
  17. 1