From 66b46576ec097b9f10b45d4b1de18bb214cd5bd5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Nov 2009 13:48:07 -0500 Subject: Moved the postscan hook to run on the raw html of a page, before the template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar. --- IkiWiki/Render.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 0889fed62..ab3a71671 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -61,6 +61,10 @@ sub backlinks ($) { sub genpage ($$) { my $page=shift; my $content=shift; + + run_hooks(postscan => sub { + shift->(page => $page, content => $content); + }); my $templatefile; run_hooks(templatefile => sub { @@ -130,10 +134,6 @@ sub genpage ($$) { $content=$template->output; - run_hooks(postscan => sub { - shift->(page => $page, content => $content); - }); - run_hooks(format => sub { $content=shift->( page => $page, -- cgit v1.2.3