diff options
-rw-r--r-- | IkiWiki/Plugin/search.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Plugin/skeleton.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 6 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 15 |
4 files changed, 18 insertions, 17 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c71fef76e..213ed45ff 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -11,8 +11,8 @@ sub import { #{{{ call => \&checkconfig); IkiWiki::hook(type => "delete", id => "hyperestraier", call => \&delete); - IkiWiki::hook(type => "render", id => "hyperestraier", - call => \&render); + IkiWiki::hook(type => "change", id => "hyperestraier", + call => \&change); IkiWiki::hook(type => "cgi", id => "hyperestraier", call => \&cgi); } # }}} @@ -41,7 +41,7 @@ sub delete (@) { #{{{ IkiWiki::estcfg(); } #}}} -sub render (@) { #{{{ +sub change (@) { #{{{ IkiWiki::debug("updating hyperestraier search index"); IkiWiki::estcmd("gather -cm -bc -cl -sd", map { diff --git a/IkiWiki/Plugin/skeleton.pm b/IkiWiki/Plugin/skeleton.pm index cae4c02ec..d5a2125e5 100644 --- a/IkiWiki/Plugin/skeleton.pm +++ b/IkiWiki/Plugin/skeleton.pm @@ -17,8 +17,8 @@ sub import { #{{{ call => \&filter); IkiWiki::hook(type => "delete", id => "skeleton", call => \&delete); - IkiWiki::hook(type => "render", id => "skeleton", - call => \&render); + IkiWiki::hook(type => "change", id => "skeleton", + call => \&change); IkiWiki::hook(type => "cgi", id => "skeleton", call => \&cgi); } # }}} @@ -47,10 +47,10 @@ sub delete (@) { #{{{ IkiWiki::debug("skeleton plugin told that files were deleted: @files"); } #}}} -sub render (@) { #{{{ +sub change (@) { #{{{ my @files=@_; - IkiWiki::debug("skeleton plugin told that files were rendered: @files"); + IkiWiki::debug("skeleton plugin told that changed files were rendered: @files"); } #}}} sub cgi ($) { #{{{ diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 6f685f3b8..262e0ec29 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -477,9 +477,9 @@ FILE: foreach my $file (@files) { $hooks{delete}{$id}{call}->(@del); } } - if (%rendered && exists $hooks{render}) { - foreach my $id (keys %{$hooks{render}}) { - $hooks{render}{$id}{call}->(keys %rendered); + if (%rendered && exists $hooks{change}) { + foreach my $id (keys %{$hooks{change}}) { + $hooks{change}{$id}{call}->(keys %rendered); } } } #}}} diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 969862842..ae2f8b904 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -49,10 +49,11 @@ return the error message as the output of the plugin. ### Html issues -Note that if [[HTMLSanitization]] is enabled, html in +Note that if [[HTMLSanitization]] is enabled, html in [[PreProcessorDirective]] output is sanitised, which may limit what your plugin can do. Also, the rest of the page content is not in html format at -preprocessor time. Text output by a preprocessor directive will be passed through markdown along with the rest of the page. +preprocessor time. Text output by a preprocessor directive will be passed +through markdown along with the rest of the page. ## Other types of hooks @@ -83,13 +84,13 @@ make arbitrary changes. The function is passed named parameters `page` and Each time a page or pages is removed from the wiki, the referenced function is called, and passed the names of the source files that were removed. -### render +### change - IkiWiki::hook(type => "render", id => "foo", call => \&render); + IkiWiki::hook(type => "change", id => "foo", call => \&render); -Each time ikiwiki renders a change or addition (but not deletion) of a page -to the wiki, the referenced function is called, and passed the name of the -source file that was rendered. +Each time ikiwiki renders a change or addition (but not deletion) to the +wiki, the referenced function is called, and passed the names of the +source files that were rendered. ### cgi |