X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/15fd89d64deaeeee921a02b240d5036bbd896f89..f2b3d1341447cbf29189ab490daae418fbe5d02d:/IkiWiki/Plugin/linkmap.pm diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index b8b4cf40d..3d20a6521 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -28,8 +28,9 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; - # Needs to update whenever a relevant page's links change. - add_depends($params{page}, $params{pages}, links => 1); + # Needs to update whenever a relevant page is added, or removed, or + # its links change. + add_depends($params{page}, $params{pages}, presence => 1, links => 1); # Can't just return the linkmap here, since the htmlscrubber # scrubs out all tags (with good reason!) @@ -55,7 +56,7 @@ sub genmap ($) { # Get all the items to map. my %mapitems = (); - foreach my $item (keys %links) { + foreach my $item (keys %pagesources) { if (pagespec_match($item, $params{pages}, location => $params{page})) { $mapitems{$item}=urlto($item, $params{destpage}); }