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 => "needsbuild", id => "skeleton", call => \&needsbuild);
15 hook(type => "preprocess", id => "skeleton", call => \&preprocess);
16 hook(type => "filter", id => "skeleton", call => \&filter);
17 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
18 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
19 hook(type => "format", id => "skeleton", call => \&format);
20 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
21 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
22 hook(type => "delete", id => "skeleton", call => \&delete);
23 hook(type => "change", id => "skeleton", call => \&change);
24 hook(type => "cgi", id => "skeleton", call => \&cgi);
25 hook(type => "auth", id => "skeleton", call => \&auth);
26 hook(type => "canedit", id => "skeleton", call => \&canedit);
27 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
28 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
29 hook(type => "savestate", id => "savestate", call => \&savestate);
33 debug("skeleton plugin getopt");
36 sub checkconfig () { #{{{
37 debug("skeleton plugin checkconfig");
40 sub needsbuild () { #{{{
41 debug("skeleton plugin needsbuild");
44 sub preprocess (@) { #{{{
47 return "skeleton plugin result";
53 debug("skeleton plugin running as filter");
55 return $params{content};
58 sub htmlize (@) { #{{{
61 debug("skeleton plugin running as htmlize");
63 return $params{content};
66 sub sanitize (@) { #{{{
69 debug("skeleton plugin running as a sanitizer");
71 return $params{content};
77 debug("skeleton plugin running as a formatter");
79 return $params{content};
82 sub pagetemplate (@) { #{{{
84 my $page=$params{page};
85 my $template=$params{template};
87 debug("skeleton plugin running as a pagetemplate hook");
90 sub templatefile (@) { #{{{
92 my $page=$params{page};
94 debug("skeleton plugin running as a templatefile hook");
100 debug("skeleton plugin told that files were deleted: @files");
103 sub change (@) { #{{{
106 debug("skeleton plugin told that changed files were rendered: @files");
112 debug("skeleton plugin running in cgi");
119 debug("skeleton plugin running in auth");
122 sub canedit ($$$) { #{{{
127 debug("skeleton plugin running in canedit");
130 sub formbuilder_setup (@) { #{{{
133 debug("skeleton plugin running in formbuilder_setup");
136 sub formbuilder (@) { #{{{
139 debug("skeleton plugin running in formbuilder");
142 sub savestate () { #{{{
143 debug("skeleton plugin running in savestate");