use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
hook(type => "getsetup", id => "pagecount", call => \&getsetup);
hook(type => "preprocess", id => "pagecount", call => \&preprocess);
-} # }}}
+}
-sub getsetup () { #{{{
+sub getsetup () {
return
plugin => {
safe => 1,
rebuild => undef,
},
-} #}}}
+}
-sub preprocess (@) { #{{{
+sub preprocess (@) {
my %params=@_;
$params{pages}="*" unless defined $params{pages};
$count++ if pagespec_match($page, $params{pages}, location => $params{page});
}
return $count;
-} # }}}
+}
1