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 => "needsbuild", id => "skeleton", call => \&needsbuild);
16 hook(type => "preprocess", id => "skeleton", call => \&preprocess);
17 hook(type => "filter", id => "skeleton", call => \&filter);
18 hook(type => "linkify", id => "skeleton", call => \&linkify);
19 hook(type => "scan", id => "skeleton", call => \&scan);
20 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
21 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
22 hook(type => "postscan", id => "skeleton", call => \&postscan);
23 hook(type => "format", id => "skeleton", call => \&format);
24 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
25 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
26 hook(type => "delete", id => "skeleton", call => \&delete);
27 hook(type => "change", id => "skeleton", call => \&change);
28 hook(type => "cgi", id => "skeleton", call => \&cgi);
29 hook(type => "auth", id => "skeleton", call => \&auth);
30 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
31 hook(type => "canedit", id => "skeleton", call => \&canedit);
32 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
33 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
34 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
35 hook(type => "savestate", id => "skeleton", call => \&savestate);
39 debug("skeleton plugin getopt");
42 sub getsetup () { #{{{
47 description => "example option",
53 sub checkconfig () { #{{{
54 debug("skeleton plugin checkconfig");
57 sub needsbuild () { #{{{
58 debug("skeleton plugin needsbuild");
61 sub preprocess (@) { #{{{
64 return "skeleton plugin result";
70 debug("skeleton plugin running as filter");
72 return $params{content};
75 sub linkify (@) { #{{{
78 debug("skeleton plugin running as linkify");
80 return $params{content};
86 debug("skeleton plugin running as scan");
89 sub htmlize (@) { #{{{
92 debug("skeleton plugin running as htmlize");
94 return $params{content};
97 sub sanitize (@) { #{{{
100 debug("skeleton plugin running as a sanitizer");
102 return $params{content};
105 sub postscan (@) { #{{{
108 debug("skeleton plugin running as postscan");
111 sub format (@) { #{{{
114 debug("skeleton plugin running as a formatter");
116 return $params{content};
119 sub pagetemplate (@) { #{{{
121 my $page=$params{page};
122 my $template=$params{template};
124 debug("skeleton plugin running as a pagetemplate hook");
127 sub templatefile (@) { #{{{
129 my $page=$params{page};
131 debug("skeleton plugin running as a templatefile hook");
134 sub delete (@) { #{{{
137 debug("skeleton plugin told that files were deleted: @files");
140 sub change (@) { #{{{
143 debug("skeleton plugin told that changed files were rendered: @files");
149 debug("skeleton plugin running in cgi");
156 debug("skeleton plugin running in auth");
159 sub sessionncgi ($$) { #{{{
163 debug("skeleton plugin running in sessioncgi");
166 sub canedit ($$$) { #{{{
171 debug("skeleton plugin running in canedit");
174 sub editcontent ($$$) { #{{{
177 debug("skeleton plugin running in editcontent");
179 return $params{content};
182 sub formbuilder_setup (@) { #{{{
185 debug("skeleton plugin running in formbuilder_setup");
188 sub formbuilder (@) { #{{{
191 debug("skeleton plugin running in formbuilder");
194 sub savestate () { #{{{
195 debug("skeleton plugin running in savestate");