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 => "refresh", id => "skeleton", call => \&refresh);
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 checkconfig () { #{{{
43 debug("skeleton plugin checkconfig");
47 debug("skeleton plugin refresh");
50 sub needsbuild () { #{{{
51 debug("skeleton plugin needsbuild");
54 sub preprocess (@) { #{{{
57 return "skeleton plugin result";
63 debug("skeleton plugin running as filter");
65 return $params{content};
68 sub linkify (@) { #{{{
71 debug("skeleton plugin running as linkify");
73 return $params{content};
79 debug("skeleton plugin running as scan");
82 sub htmlize (@) { #{{{
85 debug("skeleton plugin running as htmlize");
87 return $params{content};
90 sub sanitize (@) { #{{{
93 debug("skeleton plugin running as a sanitizer");
95 return $params{content};
98 sub postscan (@) { #{{{
101 debug("skeleton plugin running as postscan");
104 sub format (@) { #{{{
107 debug("skeleton plugin running as a formatter");
109 return $params{content};
112 sub pagetemplate (@) { #{{{
114 my $page=$params{page};
115 my $template=$params{template};
117 debug("skeleton plugin running as a pagetemplate hook");
120 sub templatefile (@) { #{{{
122 my $page=$params{page};
124 debug("skeleton plugin running as a templatefile hook");
127 sub delete (@) { #{{{
130 debug("skeleton plugin told that files were deleted: @files");
133 sub change (@) { #{{{
136 debug("skeleton plugin told that changed files were rendered: @files");
142 debug("skeleton plugin running in cgi");
149 debug("skeleton plugin running in auth");
152 sub sessionncgi ($$) { #{{{
156 debug("skeleton plugin running in sessioncgi");
159 sub canedit ($$$) { #{{{
164 debug("skeleton plugin running in canedit");
167 sub editcontent ($$$) { #{{{
170 debug("skeleton plugin running in editcontent");
172 return $params{content};
175 sub formbuilder_setup (@) { #{{{
178 debug("skeleton plugin running in formbuilder_setup");
181 sub formbuilder (@) { #{{{
184 debug("skeleton plugin running in formbuilder");
187 sub savestate () { #{{{
188 debug("skeleton plugin running in savestate");