summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/search.pm6
-rw-r--r--IkiWiki/Plugin/skeleton.pm7
-rw-r--r--IkiWiki/Render.pm4
3 files changed, 12 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 284f477fa..822b5974e 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -9,7 +9,7 @@ use IkiWiki 2.00;
sub import { #{{{
hook(type => "checkconfig", id => "search", call => \&checkconfig);
hook(type => "pagetemplate", id => "search", call => \&pagetemplate);
- hook(type => "sanitize", id => "search", call => \&index);
+ hook(type => "postscan", id => "search", call => \&index);
hook(type => "delete", id => "search", call => \&delete);
hook(type => "cgi", id => "search", call => \&cgi);
} # }}}
@@ -48,8 +48,6 @@ my $scrubber;
my $stemmer;
sub index (@) { #{{{
my %params=@_;
-
- return $params{content} if $IkiWiki::preprocessing{$params{destpage}};
setupfiles();
@@ -132,8 +130,6 @@ sub index (@) { #{{{
$doc->add_term($pageterm);
$db->replace_document_by_term($pageterm, $doc);
-
- return $params{content};
} #}}}
sub delete (@) { #{{{
diff --git a/IkiWiki/Plugin/skeleton.pm b/IkiWiki/Plugin/skeleton.pm
index 17a2162ff..1af8e4e9d 100644
--- a/IkiWiki/Plugin/skeleton.pm
+++ b/IkiWiki/Plugin/skeleton.pm
@@ -18,6 +18,7 @@ sub import { #{{{
hook(type => "scan", id => "skeleton", call => \&scan);
hook(type => "htmlize", id => "skeleton", call => \&htmlize);
hook(type => "sanitize", id => "skeleton", call => \&sanitize);
+ hook(type => "postscan", id => "skeleton", call => \&postscan);
hook(type => "format", id => "skeleton", call => \&format);
hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
hook(type => "templatefile", id => "skeleton", call => \&templatefile);
@@ -89,6 +90,12 @@ sub sanitize (@) { #{{{
return $params{content};
} # }}}
+sub postscan (@) { #{{{
+ my %params=@_;
+
+ debug("skeleton plugin running as postscan");
+} # }}}
+
sub format (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 8a79119cd..fc1bc0c92 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -117,6 +117,10 @@ sub genpage ($$) { #{{{
});
$content=$template->output;
+
+ run_hooks(postscan => sub {
+ shift->(page => $page, content => $content);
+ });
run_hooks(format => sub {
$content=shift->(