From: Joey Hess Date: Tue, 6 Oct 2009 21:47:10 +0000 (-0400) Subject: linkmap: Use a combination of presence and link dependencies. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/af85f62d6fd7c3b437fa527bff3392616d3513dc?ds=sidebyside linkmap: Use a combination of presence and link dependencies. This makes the map be regenerated much less frequently, so larger maps are more practical to use now. --- diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index d0671ae0e..d7ba68da9 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -28,9 +28,9 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; - # Needs to update whenever a page is added, removed, or - # its links change, so register a dependency. - add_depends($params{page}, $params{pages}); + # 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!) diff --git a/debian/changelog b/debian/changelog index 89d377769..a006d3177 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,9 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low This makes them more efficient. It also fixes a longstanding bug, where if only a small set of pages were considered by orphans/pagestats, changes to links on other pages failed to cause an update. + * linkmap: Use a combination of presence and link dependencies. + This makes the map be regenerated much less frequently, so larger + maps are more practical to use now. * Transitive dependencies are now correctly supported. * Rebuild wikis on upgrade to this version to get improved dependency info. diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn index db79a1491..38cf0fd11 100644 --- a/doc/ikiwiki/directive/linkmap.mdwn +++ b/doc/ikiwiki/directive/linkmap.mdwn @@ -9,9 +9,7 @@ Only links between mapped pages will be shown; links pointing to or from unmapped pages will be omitted. If the pages to include are not specified, the links between all pages (and other files) in the wiki are mapped. For best results, only a small set of pages should be mapped, since otherwise -the map can become very large, unwieldy, and complicated. Also, the map is -rebuilt whenever one of the mapped pages is changed, which can make the -wiki a bit slow. +the map can become very large, unwieldy, and complicated. Here are descriptions of all the supported parameters to the `linkmap` directive: