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 => "postscan", id => "skeleton", call => \&postscan);
22 hook(type => "format", id => "skeleton", call => \&format);
23 hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
24 hook(type => "templatefile", id => "skeleton", call => \&templatefile);
25 hook(type => "delete", id => "skeleton", call => \&delete);
26 hook(type => "change", id => "skeleton", call => \&change);
27 hook(type => "cgi", id => "skeleton", call => \&cgi);
28 hook(type => "auth", id => "skeleton", call => \&auth);
29 hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
30 hook(type => "canedit", id => "skeleton", call => \&canedit);
31 hook(type => "editcontent", id => "skeleton", call => \&editcontent);
32 hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
33 hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
34 hook(type => "savestate", id => "skeleton", call => \&savestate);
38 debug("skeleton plugin getopt");
41 sub checkconfig () { #{{{
42 debug("skeleton plugin checkconfig");
45 sub needsbuild () { #{{{
46 debug("skeleton plugin needsbuild");
49 sub preprocess (@) { #{{{
52 return "skeleton plugin result";
58 debug("skeleton plugin running as filter");
60 return $params{content};
63 sub linkify (@) { #{{{
66 debug("skeleton plugin running as linkify");
68 return $params{content};
74 debug("skeleton plugin running as scan");
77 sub htmlize (@) { #{{{
80 debug("skeleton plugin running as htmlize");
82 return $params{content};
85 sub sanitize (@) { #{{{
88 debug("skeleton plugin running as a sanitizer");
90 return $params{content};
93 sub postscan (@) { #{{{
96 debug("skeleton plugin running as postscan");
102 debug("skeleton plugin running as a formatter");
104 return $params{content};
107 sub pagetemplate (@) { #{{{
109 my $page=$params{page};
110 my $template=$params{template};
112 debug("skeleton plugin running as a pagetemplate hook");
115 sub templatefile (@) { #{{{
117 my $page=$params{page};
119 debug("skeleton plugin running as a templatefile hook");
122 sub delete (@) { #{{{
125 debug("skeleton plugin told that files were deleted: @files");
128 sub change (@) { #{{{
131 debug("skeleton plugin told that changed files were rendered: @files");
137 debug("skeleton plugin running in cgi");
144 debug("skeleton plugin running in auth");
147 sub sessionncgi ($$) { #{{{
151 debug("skeleton plugin running in sessioncgi");
154 sub canedit ($$$) { #{{{
159 debug("skeleton plugin running in canedit");
162 sub editcontent ($$$) { #{{{
165 debug("skeleton plugin running in editcontent");
167 return $params{content};
170 sub formbuilder_setup (@) { #{{{
173 debug("skeleton plugin running in formbuilder_setup");
176 sub formbuilder (@) { #{{{
179 debug("skeleton plugin running in formbuilder");
182 sub savestate () { #{{{
183 debug("skeleton plugin running in savestate");