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);
} # }}}
IkiWiki::estcfg();
} #}}}
-sub render (@) { #{{{
+sub change (@) { #{{{
IkiWiki::debug("updating hyperestraier search index");
IkiWiki::estcmd("gather -cm -bc -cl -sd",
map {
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);
} # }}}
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 ($) { #{{{
$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);
}
}
} #}}}
### 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
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