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 => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
25 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
26 hook(type => "savestate", id => "savestate", call => \&savestate);
30 debug("skeleton plugin getopt");
33 sub checkconfig () { #{{{
34 debug("skeleton plugin checkconfig");
37 sub preprocess (@) { #{{{
40 return "skeleton plugin result";
46 debug("skeleton plugin running as filter");
48 return $params{content};
51 sub htmlize (@) { #{{{
54 debug("skeleton plugin running as htmlize");
56 return $params{content};
59 sub sanitize (@) { #{{{
62 debug("skeleton plugin running as a sanitizer");
64 return $params{content};
70 debug("skeleton plugin running as a formatter");
72 return $params{content};
75 sub pagetemplate (@) { #{{{
77 my $page=$params{page};
78 my $template=$params{template};
80 debug("skeleton plugin running as a pagetemplate hook");
86 debug("skeleton plugin told that files were deleted: @files");
92 debug("skeleton plugin told that changed files were rendered: @files");
98 debug("skeleton plugin running in cgi");
105 debug("skeleton plugin running in auth");
108 sub formbuilder_setup (@) { #{{{
111 debug("skeleton plugin running in formbuilder_setup");
114 sub formbuilder (@) { #{{{
117 debug("skeleton plugin running in formbuilder");
120 sub savestate () { #{{{
121 debug("skeleton plugin running in savestate");