web commit by joey
[ikiwiki] / 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;
10
11 sub import { #{{{
12         IkiWiki::hook(type => "checkconfig", id => "skeleton", 
13                 call => \&checkconfig);
14         IkiWiki::hook(type => "preprocess", id => "skeleton", 
15                 call => \&preprocess);
16         IkiWiki::hook(type => "delete", id => "skeleton", 
17                 call => \&delete);
18         IkiWiki::hook(type => "render", id => "skeleton", 
19                 call => \&render);
20         IkiWiki::hook(type => "cgi", id => "skeleton", 
21                 call => \&cgi);
22 } # }}}
23
24 sub checkconfig () { #{{{
25         IkiWiki::debug("skeleton plugin checkconfig");
26 } #}}}
27
28 sub preprocess (@) { #{{{
29         my %params=@_;
30
31         return "skeleton plugin result";
32 } # }}}
33
34 sub delete (@) { #{{{
35         my @files=@_;
36
37         IkiWiki::debug("skeleton plugin told that files were deleted: @files");
38 } #}}}
39
40 sub render (@) { #{{{
41         my @files=@_;
42
43         IkiWiki::debug("skeleton plugin told that files were rendered: @files");
44 } #}}}
45
46 sub cgi ($) { #{{{
47         my $cgi=shift;
48
49         IkiWiki::debug("skeleton plugin running in cgi");
50 } #}}}
51
52 1