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 => "canedit", id => "skeleton", call => \&canedit);
25 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
26 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
27 hook(type => "savestate", id => "savestate", call => \&savestate);
31 debug("skeleton plugin getopt");
34 sub checkconfig () { #{{{
35 debug("skeleton plugin checkconfig");
38 sub preprocess (@) { #{{{
41 return "skeleton plugin result";
47 debug("skeleton plugin running as filter");
49 return $params{content};
52 sub htmlize (@) { #{{{
55 debug("skeleton plugin running as htmlize");
57 return $params{content};
60 sub sanitize (@) { #{{{
63 debug("skeleton plugin running as a sanitizer");
65 return $params{content};
71 debug("skeleton plugin running as a formatter");
73 return $params{content};
76 sub pagetemplate (@) { #{{{
78 my $page=$params{page};
79 my $template=$params{template};
81 debug("skeleton plugin running as a pagetemplate hook");
87 debug("skeleton plugin told that files were deleted: @files");
93 debug("skeleton plugin told that changed files were rendered: @files");
99 debug("skeleton plugin running in cgi");
106 debug("skeleton plugin running in auth");
109 sub canedit ($$$) { #{{{
114 debug("skeleton plugin running in canedit");
117 sub formbuilder_setup (@) { #{{{
120 debug("skeleton plugin running in formbuilder_setup");
123 sub formbuilder (@) { #{{{
126 debug("skeleton plugin running in formbuilder");
129 sub savestate () { #{{{
130 debug("skeleton plugin running in savestate");