add paths to plugin files in copyright
[ikiwiki.git] / IkiWiki / Plugin / localstyle.pm
blob111f4dc30b44cd41404995da4fd23164decaab67
1 #!/usr/bin/perl
3 package IkiWiki::Plugin::localstyle;
5 use warnings;
6 use strict;
7 use IkiWiki 3.00;
9 sub import {
10 hook(type => "getsetup", id => "localstyle", call => \&getsetup);
11 hook(type => "pagetemplate", id => "localstyle", call => \&pagetemplate);
14 sub getsetup () {
15 return
16 plugin => {
17 safe => 1,
18 rebuild => 1,
22 sub pagetemplate (@) {
23 my %params=@_;
25 my $template=$params{template};
27 if ($template->query(name => "local_css")) {
28 my $best=bestlink($params{page}, 'local.css');
29 if ($best) {
30 $template->param(local_css => $best);