X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e4cd168ebedd95585290c97ff42234344bfed46c..031d1bf5046ab77c796477a19967e7c0c512c417:/IkiWiki/Plugin/map.pm diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index cc977024d..625cfdfca 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -68,12 +68,14 @@ sub preprocess (@) { } # Needs to update whenever a page is added or removed (or in some - # cases, when its content changes, if show=title), so register a - # dependency. - add_depends($params{page}, $params{pages}); + # cases, when its content changes, if show= is specified), so + # register a dependency. + add_depends($params{page}, $params{pages}, presence => ! exists $params{show}); # Explicitly add all currently shown pages, to detect when pages # are removed. - add_depends($params{page}, [keys %mapitems]); + foreach my $item (keys %mapitems) { + add_depends($params{page}, $item, presence => ! exists $params{show}); + } # Create the map. my $parent="";