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 => "sessioncgi", id => "skeleton", call => \&sessioncgi);
27 hook(type => "canedit", id => "skeleton", call => \&canedit);
28 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
29 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
30 hook(type => "savestate", id => "skeleton", call => \&savestate);
34 debug("skeleton plugin getopt");
37 sub checkconfig () { #{{{
38 debug("skeleton plugin checkconfig");
41 sub needsbuild () { #{{{
42 debug("skeleton plugin needsbuild");
45 sub preprocess (@) { #{{{
48 return "skeleton plugin result";
54 debug("skeleton plugin running as filter");
56 return $params{content};
59 sub htmlize (@) { #{{{
62 debug("skeleton plugin running as htmlize");
64 return $params{content};
67 sub sanitize (@) { #{{{
70 debug("skeleton plugin running as a sanitizer");
72 return $params{content};
78 debug("skeleton plugin running as a formatter");
80 return $params{content};
83 sub pagetemplate (@) { #{{{
85 my $page=$params{page};
86 my $template=$params{template};
88 debug("skeleton plugin running as a pagetemplate hook");
91 sub templatefile (@) { #{{{
93 my $page=$params{page};
95 debug("skeleton plugin running as a templatefile hook");
101 debug("skeleton plugin told that files were deleted: @files");
104 sub change (@) { #{{{
107 debug("skeleton plugin told that changed files were rendered: @files");
113 debug("skeleton plugin running in cgi");
120 debug("skeleton plugin running in auth");
123 sub sessionncgi ($$) { #{{{
127 debug("skeleton plugin running in sessioncgi");
130 sub canedit ($$$) { #{{{
135 debug("skeleton plugin running in canedit");
138 sub formbuilder_setup (@) { #{{{
141 debug("skeleton plugin running in formbuilder_setup");
144 sub formbuilder (@) { #{{{
147 debug("skeleton plugin running in formbuilder");
150 sub savestate () { #{{{
151 debug("skeleton plugin running in savestate");