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 hook(type => "getopt", id => "skeleton", call => \&getopt);
13 hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
14 hook(type => "preprocess", id => "skeleton", call => \&preprocess);
15 hook(type => "filter", id => "skeleton", call => \&filter);
16 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
17 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
18 hook(type => "format", id => "skeleton", call => \&format);
19 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
20 hook(type => "delete", id => "skeleton", call => \&delete);
21 hook(type => "change", id => "skeleton", call => \&change);
22 hook(type => "cgi", id => "skeleton", call => \&cgi);
23 hook(type => "savestate", id => "savestate", call => \&savestate);
27 debug("skeleton plugin getopt");
30 sub checkconfig () { #{{{
31 debug("skeleton plugin checkconfig");
34 sub preprocess (@) { #{{{
37 return "skeleton plugin result";
43 debug("skeleton plugin running as filter");
45 return $params{content};
48 sub htmlize (@) { #{{{
51 debug("skeleton plugin running as htmlize");
53 return $params{content};
56 sub sanitize (@) { #{{{
59 debug("skeleton plugin running as a sanitizer");
61 return $params{content};
67 debug("skeleton plugin running as a formatter");
69 return $params{content};
72 sub pagetemplate (@) { #{{{
74 my $page=$params{page};
75 my $template=$params{template};
77 debug("skeleton plugin running as a pagetemplate hook");
83 debug("skeleton plugin told that files were deleted: @files");
89 debug("skeleton plugin told that changed files were rendered: @files");
95 debug("skeleton plugin running in cgi");
98 sub savestate () { #{{{
99 debug("skeleton plugin running in savestate");