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 => "linkify", id => "skeleton", call => \&linkify);
18 hook(type => "scan", id => "skeleton", call => \&scan);
19 hook(type => "htmlize", id => "skeleton", call => \&htmlize);
20 hook(type => "sanitize", id => "skeleton", call => \&sanitize);
21 hook(type => "format", id => "skeleton", call => \&format);
22 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
23 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
24 hook(type => "delete", id => "skeleton", call => \&delete);
25 hook(type => "change", id => "skeleton", call => \&change);
26 hook(type => "cgi", id => "skeleton", call => \&cgi);
27 hook(type => "auth", id => "skeleton", call => \&auth);
28 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
29 hook(type => "canedit", id => "skeleton", call => \&canedit);
30 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
31 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
32 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
33 hook(type => "savestate", id => "skeleton", call => \&savestate);
37 debug("skeleton plugin getopt");
40 sub checkconfig () { #{{{
41 debug("skeleton plugin checkconfig");
44 sub needsbuild () { #{{{
45 debug("skeleton plugin needsbuild");
48 sub preprocess (@) { #{{{
51 return "skeleton plugin result";
57 debug("skeleton plugin running as filter");
59 return $params{content};
62 sub linkify (@) { #{{{
65 debug("skeleton plugin running as linkify");
67 return $params{content};
73 debug("skeleton plugin running as scan");
76 sub htmlize (@) { #{{{
79 debug("skeleton plugin running as htmlize");
81 return $params{content};
84 sub sanitize (@) { #{{{
87 debug("skeleton plugin running as a sanitizer");
89 return $params{content};
95 debug("skeleton plugin running as a formatter");
97 return $params{content};
100 sub pagetemplate (@) { #{{{
102 my $page=$params{page};
103 my $template=$params{template};
105 debug("skeleton plugin running as a pagetemplate hook");
108 sub templatefile (@) { #{{{
110 my $page=$params{page};
112 debug("skeleton plugin running as a templatefile hook");
115 sub delete (@) { #{{{
118 debug("skeleton plugin told that files were deleted: @files");
121 sub change (@) { #{{{
124 debug("skeleton plugin told that changed files were rendered: @files");
130 debug("skeleton plugin running in cgi");
137 debug("skeleton plugin running in auth");
140 sub sessionncgi ($$) { #{{{
144 debug("skeleton plugin running in sessioncgi");
147 sub canedit ($$$) { #{{{
152 debug("skeleton plugin running in canedit");
155 sub editcontent ($$$) { #{{{
158 debug("skeleton plugin running in editcontent");
160 return $params{content};
163 sub formbuilder_setup (@) { #{{{
166 debug("skeleton plugin running in formbuilder_setup");
169 sub formbuilder (@) { #{{{
172 debug("skeleton plugin running in formbuilder");
175 sub savestate () { #{{{
176 debug("skeleton plugin running in savestate");