X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6eaf9e40154050936ad9184d64295664da2cc83c..b6b7dc3a43266515822c31b177bfd26e8d59f359:/IkiWiki/Plugin/orphans.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index d981670e7..ae330b23b 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -23,9 +23,13 @@ sub preprocess (@) { my %params=@_; $params{pages}="*" unless defined $params{pages}; - # Needs to update whenever a page is changed, added, or removed, - # in order to see the link changes. - add_depends($params{page}, $params{pages}); + # Needs to update whenever a link changes, on any page + # since any page could link to one of the pages we're + # considering as orphans. + add_depends($params{page}, "*", links => 1); + # Also needs to update whenever potential orphans are added or + # removed. + add_depends($params{page}, $params{pages}, presence => 1); my @orphans; foreach my $page (pagespec_match_list(