X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f1a70921e3bfc0496b5564582a5a1463b7a98c09..b6b7dc3a43266515822c31b177bfd26e8d59f359:/IkiWiki/Plugin/pagestats.pm diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 874ead7e6..afe4eeaf2 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -35,14 +35,17 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; my $style = ($params{style} or 'cloud'); - # Needs to update whenever a page is added or removed, so - # register a dependency. - add_depends($params{page}, $params{pages}); - add_depends($params{page}, $params{among}) if exists $params{among}; + # Needs to update whenever a page is added or removed. + add_depends($params{page}, $params{pages}, exists => 1); + # Also needs to update when any page with links changes, + # in case the links point to our displayed pages. + # (Among limits this further.) + add_depends($params{page}, exists $params{among} ? $params{among} : "*", + links => 1); my %counts; my $max = 0; - foreach my $page (pagespec_match_list([keys %links], + foreach my $page (pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page})) { use IkiWiki::Render;