hook(type => "filter", id => "skeleton", call => \&filter);
hook(type => "linkify", id => "skeleton", call => \&linkify);
hook(type => "scan", id => "skeleton", call => \&scan);
- hook(type => "rescan", id => "skeleton", call => \&rescan);
hook(type => "htmlize", id => "skeleton", call => \&htmlize);
hook(type => "sanitize", id => "skeleton", call => \&sanitize);
hook(type => "indexhtml", id => "skeleton", call => \&indexhtml);
debug("skeleton plugin running as scan");
}
-sub rescan (@) {
- my %params=@_;
-
- debug("skeleton plugin running as rescan");
-}
-
sub htmlize (@) {
my %params=@_;
# Preprocess in scan-only mode.
preprocess($page, $page, $content, 1);
-
- run_hooks(rescan => sub {
- shift->(
- page => $page,
- content => $content,
- );
- });
-
}
else {
will_render($file, $file, 1);
The function is passed named parameters "page" and "content". Its return
value is ignored.
-### rescan
-
- hook(type => "rescan", id => "foo", call => \&scan);
-
-This hook is called after the scan hook has been run, as well as the
-preprocess hook in scan mode. It is used to collect additional
-metadata that depends on a first scan to have been performed already.
-
-The function is passed named parameters "page" and "content". Its return
-value is ignored.
-
### filter
hook(type => "filter", id => "foo", call => \&filter);