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 => "delete", id => "skeleton", call => \&delete);
22 hook(type => "change", id => "skeleton", call => \&change);
23 hook(type => "cgi", id => "skeleton", call => \&cgi);
24 hook(type => "auth", id => "skeleton", call => \&auth);
25 hook(type => "canedit", id => "skeleton", call => \&canedit);
26 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
27 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
28 hook(type => "savestate", id => "savestate", call => \&savestate);
32 debug("skeleton plugin getopt");
35 sub checkconfig () { #{{{
36 debug("skeleton plugin checkconfig");
39 sub needsbuild () { #{{{
40 debug("skeleton plugin needsbuild");
43 sub preprocess (@) { #{{{
46 return "skeleton plugin result";
52 debug("skeleton plugin running as filter");
54 return $params{content};
57 sub htmlize (@) { #{{{
60 debug("skeleton plugin running as htmlize");
62 return $params{content};
65 sub sanitize (@) { #{{{
68 debug("skeleton plugin running as a sanitizer");
70 return $params{content};
76 debug("skeleton plugin running as a formatter");
78 return $params{content};
81 sub pagetemplate (@) { #{{{
83 my $page=$params{page};
84 my $template=$params{template};
86 debug("skeleton plugin running as a pagetemplate hook");
92 debug("skeleton plugin told that files were deleted: @files");
98 debug("skeleton plugin told that changed files were rendered: @files");
104 debug("skeleton plugin running in cgi");
111 debug("skeleton plugin running in auth");
114 sub canedit ($$$) { #{{{
119 debug("skeleton plugin running in canedit");
122 sub formbuilder_setup (@) { #{{{
125 debug("skeleton plugin running in formbuilder_setup");
128 sub formbuilder (@) { #{{{
131 debug("skeleton plugin running in formbuilder");
134 sub savestate () { #{{{
135 debug("skeleton plugin running in savestate");