X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/f1a70921e3bfc0496b5564582a5a1463b7a98c09..2fbfcd16e6d5717fea7b23d7fa82961222a6e32f:/IkiWiki/Plugin/map.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 826dbbd66..682960777 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}, content => 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, content => exists $params{show}); + } # Create the map. my $parent="";