diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-04 15:46:23 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-04 15:46:23 -0400 |
commit | 2fbfcd16e6d5717fea7b23d7fa82961222a6e32f (patch) | |
tree | 0845c088bfad3f5d8eef9d39adeb1467706a4521 /IkiWiki/Plugin | |
parent | daafdf1acb426e0abae218a04c8b22e8b9885354 (diff) |
map: Use a contentless dependency unless show= is specified.
This makes simple maps efficient enough that they can be used on sidebars!
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/map.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 54146dc46..682960777 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -68,13 +68,13 @@ 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. foreach my $item (keys %mapitems) { - add_depends($params{page}, $item); + add_depends($params{page}, $item, content => exists $params{show}); } # Create the map. |