-sub import { #{{{
- IkiWiki::hook(type => "preprocess", id => "toc",
- call => \&preprocess);
- IkiWiki::hook(type => "format", id => "toc",
- call => \&format);
-} # }}}
+sub import {
+ hook(type => "getsetup", id => "toc", call => \&getsetup);
+ hook(type => "preprocess", id => "toc", call => \&preprocess);
+ hook(type => "format", id => "toc", call => \&format);
+}
+
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ section => "widget",
+ },
+}