]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/sidebar.pm
po plugin: replace tweakbestlink hook with a wrapper function
[git.ikiwiki.info.git] / IkiWiki / Plugin / sidebar.pm
index a49726768762ac51f8b950630d104d2fd69c3e54..9697e1198d24db690cec373e9980516e077ad936 100644 (file)
@@ -9,9 +9,18 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "sidebar", call => \&getsetup);
        hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
 } # }}}
 
        hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1,
+               },
+} #}}}
+
 sub sidebar_content ($) { #{{{
        my $page=shift;
        
 sub sidebar_content ($) { #{{{
        my $page=shift;
        
@@ -27,7 +36,7 @@ sub sidebar_content ($) { #{{{
 
                my $content=readfile(srcfile($sidebar_file));
                return unless length $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, $page, $content))));
                       IkiWiki::linkify($sidebar_page, $page,
                       IkiWiki::preprocess($sidebar_page, $page,
                       IkiWiki::filter($sidebar_page, $page, $content))));