summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/orphans.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/orphans.pm')
-rw-r--r--IkiWiki/Plugin/orphans.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index 711226772..93b8ec440 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 added or removed, so
- # register a dependency.
- 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}, "*", deptype("links"));
+ # Also needs to update whenever potential orphans are added or
+ # removed.
+ add_depends($params{page}, $params{pages}, deptype("presence"));
my @orphans;
foreach my $page (pagespec_match_list(