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 => "editcontent", id => "skeleton", call => \&editcontent);
29 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
30 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
31 hook(type => "savestate", id => "skeleton", call => \&savestate);
35 debug("skeleton plugin getopt");
38 sub checkconfig () { #{{{
39 debug("skeleton plugin checkconfig");
42 sub needsbuild () { #{{{
43 debug("skeleton plugin needsbuild");
46 sub preprocess (@) { #{{{
49 return "skeleton plugin result";
55 debug("skeleton plugin running as filter");
57 return $params{content};
60 sub htmlize (@) { #{{{
63 debug("skeleton plugin running as htmlize");
65 return $params{content};
68 sub sanitize (@) { #{{{
71 debug("skeleton plugin running as a sanitizer");
73 return $params{content};
79 debug("skeleton plugin running as a formatter");
81 return $params{content};
84 sub pagetemplate (@) { #{{{
86 my $page=$params{page};
87 my $template=$params{template};
89 debug("skeleton plugin running as a pagetemplate hook");
92 sub templatefile (@) { #{{{
94 my $page=$params{page};
96 debug("skeleton plugin running as a templatefile hook");
102 debug("skeleton plugin told that files were deleted: @files");
105 sub change (@) { #{{{
108 debug("skeleton plugin told that changed files were rendered: @files");
114 debug("skeleton plugin running in cgi");
121 debug("skeleton plugin running in auth");
124 sub sessionncgi ($$) { #{{{
128 debug("skeleton plugin running in sessioncgi");
131 sub canedit ($$$) { #{{{
136 debug("skeleton plugin running in canedit");
139 sub editcontent ($$$) { #{{{
142 debug("skeleton plugin running in editcontent");
144 return $params{content};
147 sub formbuilder_setup (@) { #{{{
150 debug("skeleton plugin running in formbuilder_setup");
153 sub formbuilder (@) { #{{{
156 debug("skeleton plugin running in formbuilder");
159 sub savestate () { #{{{
160 debug("skeleton plugin running in savestate");