]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/hnb.pm
po: factorize extraction of a slave page's masterpage and lang
[git.ikiwiki.info.git] / IkiWiki / Plugin / hnb.pm
index 846b0f2c9333f27c2356fecca9d679cba8159964..40e4f945255df2b4ae21b732cd55818b41dfc821 100644 (file)
@@ -13,11 +13,20 @@ use strict;
 use IkiWiki 2.00;
 use File::Temp qw(:mktemp);
 
-sub import {
+sub import { #{{{
+       hook(type => "getsetup", id => "hnb", call => \&getsetup);
        hook(type => "htmlize", id => "hnb", call => \&htmlize);
-}
+} #}}}
 
-sub htmlize (@) {
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1, # format plugin
+               },
+} #}}}
+
+sub htmlize (@) { #{{{
        my %params = @_;
 
        # hnb outputs version number etc. every time to STDOUT, so
@@ -43,6 +52,6 @@ sub htmlize (@) {
        $ret =~ s/<body>.*//si;
 
        return $ret;
-}
+} #}}}
 
 1;