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 => "rescan", id => "skeleton", call => \&rescan);
22 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
23 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
24 hook(type => "indexhtml", id => "skeleton", call => \&indexhtml);
25 hook(type => "format", id => "skeleton", call => \&format);
26 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
27 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
28 hook(type => "pageactions", id => "skeleton", call => \&pageactions);
29 hook(type => "delete", id => "skeleton", call => \&delete);
30 hook(type => "change", id => "skeleton", call => \&change);
31 hook(type => "cgi", id => "skeleton", call => \&cgi);
32 hook(type => "auth", id => "skeleton", call => \&auth);
33 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
34 hook(type => "canedit", id => "skeleton", call => \&canedit);
35 hook(type => "canremove", id => "skeleton", call => \&canremove);
36 hook(type => "canrename", id => "skeleton", call => \&canrename);
37 hook(type => "checkcontent", id => "skeleton", call => \&checkcontent);
38 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
39 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
40 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
41 hook(type => "renamepage", id => "skeleton", call => \&renamepage);
42 hook(type => "rename", id => "skeleton", call => \&rename);
43 hook(type => "savestate", id => "skeleton", call => \&savestate);
44 hook(type => "genwrapper", id => "skeleton", call => \&genwrapper);
45 hook(type => "disable", id => "skeleton", call => \&disable);
49 debug("skeleton plugin getopt");
62 description => "example option",
69 debug("skeleton plugin checkconfig");
73 debug("skeleton plugin refresh");
77 debug("skeleton plugin needsbuild");
83 return "skeleton plugin result";
89 debug("skeleton plugin running as filter");
91 return $params{content};
97 debug("skeleton plugin running as linkify");
99 return $params{content};
105 debug("skeleton plugin running as scan");
111 debug("skeleton plugin running as rescan");
117 debug("skeleton plugin running as htmlize");
119 return $params{content};
125 debug("skeleton plugin running as a sanitizer");
127 return $params{content};
133 debug("skeleton plugin running as indexhtml");
139 debug("skeleton plugin running as a formatter");
141 return $params{content};
144 sub pagetemplate (@) {
146 my $page=$params{page};
147 my $template=$params{template};
149 debug("skeleton plugin running as a pagetemplate hook");
152 sub templatefile (@) {
154 my $page=$params{page};
156 debug("skeleton plugin running as a templatefile hook");
159 sub pageactions (@) {
161 my $page=$params{page};
163 debug("skeleton plugin running as a pageactions hook");
170 debug("skeleton plugin told that files were deleted: @files");
176 debug("skeleton plugin told that changed files were rendered: @files");
182 debug("skeleton plugin running in cgi");
189 debug("skeleton plugin running in auth");
192 sub sessioncgi ($$) {
196 debug("skeleton plugin running in sessioncgi");
204 debug("skeleton plugin running in canedit");
210 debug("skeleton plugin running in canremove");
216 debug("skeleton plugin running in canrename");
219 sub checkcontent (@) {
222 debug("skeleton plugin running in checkcontent");
225 sub editcontent ($$$) {
228 debug("skeleton plugin running in editcontent");
230 return $params{content};
233 sub formbuilder_setup (@) {
236 debug("skeleton plugin running in formbuilder_setup");
239 sub formbuilder (@) {
242 debug("skeleton plugin running in formbuilder");
248 debug("skeleton plugin running in renamepage");
254 debug("skeleton plugin running in rename");
258 debug("skeleton plugin running in savestate");
262 debug("skeleton plugin running in genwrapper");
266 debug("skeleton plugin running in disable");