2 package IkiWiki
::Plugin
::pagecount
;
9 hook
(type
=> "getsetup", id
=> "pagecount", call
=> \
&getsetup
);
10 hook
(type
=> "preprocess", id
=> "pagecount", call
=> \
&preprocess
);
24 my $pages=defined $params{pages
} ?
$params{pages
} : "*";
26 # Just get a list of all the pages, and count the items in it.
27 # Use a presence dependency to only update when pages are added
31 # optimisation to avoid needing to try matching every page
32 add_depends
($params{page
}, $pages, deptype
("presence"));
33 return scalar keys %pagesources;
36 return scalar pagespec_match_list
($params{page
}, $pages,
37 deptype
=> deptype
("presence"));