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 => "auth", id => "skeleton", call => \&auth);
24 hook(type => "savestate", id => "savestate", call => \&savestate);
28 debug("skeleton plugin getopt");
31 sub checkconfig () { #{{{
32 debug("skeleton plugin checkconfig");
35 sub preprocess (@) { #{{{
38 return "skeleton plugin result";
44 debug("skeleton plugin running as filter");
46 return $params{content};
49 sub htmlize (@) { #{{{
52 debug("skeleton plugin running as htmlize");
54 return $params{content};
57 sub sanitize (@) { #{{{
60 debug("skeleton plugin running as a sanitizer");
62 return $params{content};
68 debug("skeleton plugin running as a formatter");
70 return $params{content};
73 sub pagetemplate (@) { #{{{
75 my $page=$params{page};
76 my $template=$params{template};
78 debug("skeleton plugin running as a pagetemplate hook");
84 debug("skeleton plugin told that files were deleted: @files");
90 debug("skeleton plugin told that changed files were rendered: @files");
96 debug("skeleton plugin running in cgi");
103 debug("skeleton plugin running in auth");
106 sub savestate () { #{{{
107 debug("skeleton plugin running in savestate");