<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# favicon plugin.

package IkiWiki::Plugin::favicon;

use warnings;
use strict;
use IkiWiki 2.00;

sub import { #{{{
	hook(type =&gt; "pagetemplate", id =&gt; "favicon", call =&gt; \&amp;pagetemplate);
} # }}}

sub pagetemplate (@) { #{{{
	my %params=@_;

	my $template=$params{template};
	
	if ($template-&gt;query(name =&gt; "favicon")) {
		$template-&gt;param(favicon =&gt; "favicon.ico");
	}
} # }}}

1
</pre></body></html>