X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ef003f48f4a3fe8fb67fda62c70a299b07d75976..136979fac670b6476069a63385d3e5e53643b68e:/IkiWiki/Plugin/map.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 120451b5d..625cfdfca 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -68,19 +68,31 @@ 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}, join(" or ", keys %mapitems)); + foreach my $item (keys %mapitems) { + add_depends($params{page}, $item, presence => ! exists $params{show}); + } # Create the map. my $parent=""; my $indent=0; my $openli=0; my $addparent=""; - my $map = "