X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/39195de96e6f705e4a5741254d6d01d14127005c..4bdeec4961b8df9df449b027e37a8b17898f2c86:/IkiWiki/Plugin/pagecount.pm diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index e059fa618..c08ab3931 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -5,20 +5,20 @@ use warnings; 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}; @@ -33,6 +33,6 @@ sub preprocess (@) { #{{{ $count++ if pagespec_match($page, $params{pages}, location => $params{page}); } return $count; -} # }}} +} 1