]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/pagecount.pm
Render.pm: also use 'our' for $backlinks_calculated
[git.ikiwiki.info.git] / IkiWiki / Plugin / pagecount.pm
index 2c20ca195dcd1f55ff4cdbe9ad70fed642c236af..c08ab3931df261de093a558002712a4ccc5db685 100644 (file)
@@ -5,11 +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 preprocess (@) { #{{{
+sub getsetup () {
+       return 
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+}
+
+sub preprocess (@) {
        my %params=@_;
        $params{pages}="*" unless defined $params{pages};
        
@@ -24,6 +33,6 @@ sub preprocess (@) { #{{{
                $count++ if pagespec_match($page, $params{pages}, location => $params{page});
        }
        return $count;
-} # }}}
+}
 
 1