diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/skeleton.pm.example | 7 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example index a57a2c8fe..708d92830 100644 --- a/IkiWiki/Plugin/skeleton.pm.example +++ b/IkiWiki/Plugin/skeleton.pm.example @@ -18,6 +18,7 @@ sub import { 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); @@ -104,6 +105,12 @@ sub scan (@) { debug("skeleton plugin running as scan"); } +sub rescan (@) { + my %params=@_; + + debug("skeleton plugin running as rescan"); +} + sub htmlize (@) { my %params=@_; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index a653ab2da..5ce802317 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -183,6 +183,14 @@ sub scan ($) { # 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); |