2 # Ikiwiki skeleton plugin. Replace "skeleton" with the name of your plugin
3 # in the lines below, remove hooks you don't use, and flesh out the code to
4 # make it do something.
5 package IkiWiki::Plugin::skeleton;
12 IkiWiki::hook(type => "getopt", id => "skeleton",
14 IkiWiki::hook(type => "checkconfig", id => "skeleton",
15 call => \&checkconfig);
16 IkiWiki::hook(type => "preprocess", id => "skeleton",
17 call => \&preprocess);
18 IkiWiki::hook(type => "filter", id => "skeleton",
20 IkiWiki::hook(type => "htmlize", id => "skeleton",
22 IkiWiki::hook(type => "sanitize", id => "skeleton",
24 IkiWiki::hook(type => "format", id => "skeleton",
26 IkiWiki::hook(type => "pagetemplate", id => "skeleton",
27 call => \&pagetemplate);
28 IkiWiki::hook(type => "delete", id => "skeleton",
30 IkiWiki::hook(type => "change", id => "skeleton",
32 IkiWiki::hook(type => "cgi", id => "skeleton",
34 IkiWiki::hook(type => "savestate", id => "savestate",
39 IkiWiki::debug("skeleton plugin getopt");
42 sub checkconfig () { #{{{
43 IkiWiki::debug("skeleton plugin checkconfig");
46 sub preprocess (@) { #{{{
49 return "skeleton plugin result";
55 IkiWiki::debug("skeleton plugin running as filter");
57 return $params{content};
60 sub htmlize (@) { #{{{
63 IkiWiki::debug("skeleton plugin running as htmlize");
65 return $params{content};
68 sub sanitize (@) { #{{{
71 IkiWiki::debug("skeleton plugin running as a sanitizer");
73 return $params{content};
79 IkiWiki::debug("skeleton plugin running as a formatter");
81 return $params{content};
84 sub pagetemplate (@) { #{{{
86 my $page=$params{page};
87 my $template=$params{template};
89 IkiWiki::debug("skeleton plugin running as a pagetemplate hook");
95 IkiWiki::debug("skeleton plugin told that files were deleted: @files");
101 IkiWiki::debug("skeleton plugin told that changed files were rendered: @files");
107 IkiWiki::debug("skeleton plugin running in cgi");
110 sub savestate () { #{{{
111 IkiWiki::debug("skeleton plugin running in savestate");