]> sipb.mit.edu Git - ikiwiki.git/blob - IkiWiki/Plugin/skeleton.pm
add news item for ikiwiki 1.29
[ikiwiki.git] / IkiWiki / Plugin / skeleton.pm
1 #!/usr/bin/perl
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;
6
7 use warnings;
8 use strict;
9 use IkiWiki '1.00';
10
11 sub import { #{{{
12         hook(type => "getopt", id => "skeleton",  call => \&getopt);
13         hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
14         hook(type => "preprocess", id => "skeleton", call => \&preprocess);
15         hook(type => "filter", id => "skeleton", call => \&filter);
16         hook(type => "htmlize", id => "skeleton", call => \&htmlize);
17         hook(type => "sanitize", id => "skeleton", call => \&sanitize);
18         hook(type => "format", id => "skeleton", call => \&format);
19         hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
20         hook(type => "delete", id => "skeleton", call => \&delete);
21         hook(type => "change", id => "skeleton", call => \&change);
22         hook(type => "cgi", id => "skeleton", call => \&cgi);
23         hook(type => "savestate", id => "savestate", call => \&savestate);
24 } # }}}
25
26 sub getopt () { #{{{
27         debug("skeleton plugin getopt");
28 } #}}}
29
30 sub checkconfig () { #{{{
31         debug("skeleton plugin checkconfig");
32 } #}}}
33
34 sub preprocess (@) { #{{{
35         my %params=@_;
36
37         return "skeleton plugin result";
38 } # }}}
39
40 sub filter (@) { #{{{
41         my %params=@_;
42         
43         debug("skeleton plugin running as filter");
44
45         return $params{content};
46 } # }}}
47
48 sub htmlize (@) { #{{{
49         my %params=@_;
50
51         debug("skeleton plugin running as htmlize");
52
53         return $params{content};
54 } # }}}
55
56 sub sanitize (@) { #{{{
57         my %params=@_;
58         
59         debug("skeleton plugin running as a sanitizer");
60
61         return $params{content};
62 } # }}}
63
64 sub format (@) { #{{{
65         my %params=@_;
66         
67         debug("skeleton plugin running as a formatter");
68
69         return $params{content};
70 } # }}}
71
72 sub pagetemplate (@) { #{{{
73         my %params=@_;
74         my $page=$params{page};
75         my $template=$params{template};
76         
77         debug("skeleton plugin running as a pagetemplate hook");
78 } # }}}
79
80 sub delete (@) { #{{{
81         my @files=@_;
82
83         debug("skeleton plugin told that files were deleted: @files");
84 } #}}}
85
86 sub change (@) { #{{{
87         my @files=@_;
88
89         debug("skeleton plugin told that changed files were rendered: @files");
90 } #}}}
91
92 sub cgi ($) { #{{{
93         my $cgi=shift;
94
95         debug("skeleton plugin running in cgi");
96 } #}}}
97
98 sub savestate () { #{{{
99         debug("skeleton plugin running in savestate");
100 } #}}}
101
102 1