diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-11-08 13:48:07 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-08 13:48:07 -0500 |
commit | 66b46576ec097b9f10b45d4b1de18bb214cd5bd5 (patch) | |
tree | 9cda888650586e576da95dd5eaa28bb1ec80991d /IkiWiki | |
parent | 19ff6180a8bbb2e5441fe177a934e146d129f1c7 (diff) | |
download | ikiwiki-66b46576ec097b9f10b45d4b1de18bb214cd5bd5.tar ikiwiki-66b46576ec097b9f10b45d4b1de18bb214cd5bd5.tar.gz |
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.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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, |