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 => "postscan", id => "skeleton", call => \&postscan);
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 => "delete", id => "skeleton", call => \&delete);
28 hook(type => "change", id => "skeleton", call => \&change);
29 hook(type => "cgi", id => "skeleton", call => \&cgi);
30 hook(type => "auth", id => "skeleton", call => \&auth);
31 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
32 hook(type => "canedit", id => "skeleton", call => \&canedit);
33 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
34 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
35 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
36 hook(type => "savestate", id => "skeleton", call => \&savestate);
40 debug("skeleton plugin getopt");
43 sub getsetup () { #{{{
48 description => "example option",
54 sub checkconfig () { #{{{
55 debug("skeleton plugin checkconfig");
59 debug("skeleton plugin refresh");
62 sub needsbuild () { #{{{
63 debug("skeleton plugin needsbuild");
66 sub preprocess (@) { #{{{
69 return "skeleton plugin result";
75 debug("skeleton plugin running as filter");
77 return $params{content};
80 sub linkify (@) { #{{{
83 debug("skeleton plugin running as linkify");
85 return $params{content};
91 debug("skeleton plugin running as scan");
94 sub htmlize (@) { #{{{
97 debug("skeleton plugin running as htmlize");
99 return $params{content};
102 sub sanitize (@) { #{{{
105 debug("skeleton plugin running as a sanitizer");
107 return $params{content};
110 sub postscan (@) { #{{{
113 debug("skeleton plugin running as postscan");
116 sub format (@) { #{{{
119 debug("skeleton plugin running as a formatter");
121 return $params{content};
124 sub pagetemplate (@) { #{{{
126 my $page=$params{page};
127 my $template=$params{template};
129 debug("skeleton plugin running as a pagetemplate hook");
132 sub templatefile (@) { #{{{
134 my $page=$params{page};
136 debug("skeleton plugin running as a templatefile hook");
139 sub delete (@) { #{{{
142 debug("skeleton plugin told that files were deleted: @files");
145 sub change (@) { #{{{
148 debug("skeleton plugin told that changed files were rendered: @files");
154 debug("skeleton plugin running in cgi");
161 debug("skeleton plugin running in auth");
164 sub sessionncgi ($$) { #{{{
168 debug("skeleton plugin running in sessioncgi");
171 sub canedit ($$$) { #{{{
176 debug("skeleton plugin running in canedit");
179 sub editcontent ($$$) { #{{{
182 debug("skeleton plugin running in editcontent");
184 return $params{content};
187 sub formbuilder_setup (@) { #{{{
190 debug("skeleton plugin running in formbuilder_setup");
193 sub formbuilder (@) { #{{{
196 debug("skeleton plugin running in formbuilder");
199 sub savestate () { #{{{
200 debug("skeleton plugin running in savestate");