]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/sidebar.pm
po(match_lang, match_currentlang): use the lang() function
[git.ikiwiki.info.git] / IkiWiki / Plugin / sidebar.pm
index f0dd0ca0352ce1077141079bd349906572f00bea..9697e1198d24db690cec373e9980516e077ad936 100644 (file)
@@ -9,9 +9,18 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "sidebar", call => \&getsetup);
        hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1,
+               },
+} #}}}
+
 sub sidebar_content ($) { #{{{
        my $page=shift;
        
@@ -27,10 +36,10 @@ sub sidebar_content ($) { #{{{
 
                my $content=readfile(srcfile($sidebar_file));
                return unless length $content;
-               return IkiWiki::htmlize($page, $sidebar_type,
+               return IkiWiki::htmlize($sidebar_page, $page, $sidebar_type,
                       IkiWiki::linkify($sidebar_page, $page,
                       IkiWiki::preprocess($sidebar_page, $page,
-                      IkiWiki::filter($sidebar_page, $content))));
+                      IkiWiki::filter($sidebar_page, $page, $content))));
        }
 
 } # }}}