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 => "getsetup", id => "skeleton", call => \&getsetup);
14 hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
15 hook(type => "refresh", id => "skeleton", call => \&refresh);
16 hook(type => "needsbuild", id => "skeleton", call => \&needsbuild);
17 hook(type => "preprocess", id => "skeleton", call => \&preprocess);
18 hook(type => "filter", id => "skeleton", call => \&filter);
19 hook(type => "linkify", id => "skeleton", call => \&linkify);
20 hook(type => "scan", id => "skeleton", call => \&scan);
21 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
22 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
23 hook(type => "indexhtml", id => "skeleton", call => \&indexhtml);
24 hook(type => "format", id => "skeleton", call => \&format);
25 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
26 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
27 hook(type => "pageactions", id => "skeleton", call => \&pageactions);
28 hook(type => "delete", id => "skeleton", call => \&delete);
29 hook(type => "change", id => "skeleton", call => \&change);
30 hook(type => "cgi", id => "skeleton", call => \&cgi);
31 hook(type => "auth", id => "skeleton", call => \&auth);
32 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
33 hook(type => "canedit", id => "skeleton", call => \&canedit);
34 hook(type => "canremove", id => "skeleton", call => \&canremove);
35 hook(type => "canrename", id => "skeleton", call => \&canrename);
36 hook(type => "checkcontent", id => "skeleton", call => \&checkcontent);
37 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
38 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
39 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
40 hook(type => "renamepage", id => "skeleton", call => \&renamepage);
41 hook(type => "rename", id => "skeleton", call => \&rename);
42 hook(type => "savestate", id => "skeleton", call => \&savestate);
43 hook(type => "genwrapper", id => "skeleton", call => \&genwrapper);
47 debug("skeleton plugin getopt");
59 description => "example option",
66 debug("skeleton plugin checkconfig");
70 debug("skeleton plugin refresh");
74 debug("skeleton plugin needsbuild");
80 return "skeleton plugin result";
86 debug("skeleton plugin running as filter");
88 return $params{content};
94 debug("skeleton plugin running as linkify");
96 return $params{content};
102 debug("skeleton plugin running as scan");
108 debug("skeleton plugin running as htmlize");
110 return $params{content};
116 debug("skeleton plugin running as a sanitizer");
118 return $params{content};
124 debug("skeleton plugin running as indexhtml");
130 debug("skeleton plugin running as a formatter");
132 return $params{content};
135 sub pagetemplate (@) {
137 my $page=$params{page};
138 my $template=$params{template};
140 debug("skeleton plugin running as a pagetemplate hook");
143 sub templatefile (@) {
145 my $page=$params{page};
147 debug("skeleton plugin running as a templatefile hook");
150 sub pageactions (@) {
152 my $page=$params{page};
154 debug("skeleton plugin running as a pageactions hook");
161 debug("skeleton plugin told that files were deleted: @files");
167 debug("skeleton plugin told that changed files were rendered: @files");
173 debug("skeleton plugin running in cgi");
180 debug("skeleton plugin running in auth");
183 sub sessioncgi ($$) {
187 debug("skeleton plugin running in sessioncgi");
195 debug("skeleton plugin running in canedit");
201 debug("skeleton plugin running in canremove");
207 debug("skeleton plugin running in canrename");
210 sub checkcontent (@) {
213 debug("skeleton plugin running in checkcontent");
216 sub editcontent ($$$) {
219 debug("skeleton plugin running in editcontent");
221 return $params{content};
224 sub formbuilder_setup (@) {
227 debug("skeleton plugin running in formbuilder_setup");
230 sub formbuilder (@) {
233 debug("skeleton plugin running in formbuilder");
239 debug("skeleton plugin running in renamepage");
245 debug("skeleton plugin running in rename");
249 debug("skeleton plugin running in savestate");
253 debug("skeleton plugin running in genwrapper");