aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2012-03-18 17:34:39 +0000
committerSimon McVittie <smcv@debian.org>2012-03-18 17:34:39 +0000
commit24168b993e65994d2996d02bfaa36fb80bb65ca7 (patch)
tree9a7480f1deb2222e4b80289bdc7e4697f084d06e /IkiWiki/Render.pm
parent63bb8b42f76e350cdf7a1256ad0fe7ad63199f63 (diff)
downloadikiwiki-24168b993e65994d2996d02bfaa36fb80bb65ca7.tar
ikiwiki-24168b993e65994d2996d02bfaa36fb80bb65ca7.tar.gz
Add a build_affected hook so trail doesn't have to inject
In principle, building any pages affected by links, backlinks etc. could work the same way.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 05132a8a8..adb39a983 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -800,6 +800,14 @@ sub refresh () {
derender_internal($file);
}
+ run_hooks(build_affected => sub {
+ my %affected = shift->();
+ while (my ($page, $message) = each %affected) {
+ next unless exists $pagesources{$page};
+ render($pagesources{$page}, $message);
+ }
+ });
+
my ($backlinkchanged, $linkchangers)=calculate_changed_links($changed,
$del, $oldlink_targets);