use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
+ hook(type => "getsetup", id => "sidebar", call => \&getsetup);
hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
-} # }}}
+}
-sub sidebar_content ($) { #{{{
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+}
+
+sub sidebar_content ($) {
my $page=shift;
my $sidebar_page=bestlink($page, "sidebar") || return;
IkiWiki::filter($sidebar_page, $page, $content))));
}
-} # }}}
+}
-sub pagetemplate (@) { #{{{
+sub pagetemplate (@) {
my %params=@_;
my $page=$params{page};
$template->param(sidebar => $content);
}
}
-} # }}}
+}
1