summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/favicon.pm
blob: 864131d1e128ce5d1b84776a945d1ba9c6f89a1f (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.ico");
  15. }
  16. } # }}}
  17. 1