summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/skeleton.pm
blob: d5a2125e5e3502e127ce97c9e17bfc197b13cc4a (plain)
  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. use warnings;
  7. use strict;
  8. use IkiWiki;
  9. sub import { #{{{
  10. IkiWiki::hook(type => "checkconfig", id => "skeleton",
  11. call => \&checkconfig);
  12. IkiWiki::hook(type => "preprocess", id => "skeleton",
  13. call => \&preprocess);
  14. IkiWiki::hook(type => "filter", id => "skeleton",
  15. call => \&filter);
  16. IkiWiki::hook(type => "delete", id => "skeleton",
  17. call => \&delete);
  18. IkiWiki::hook(type => "change", id => "skeleton",
  19. call => \&change);
  20. IkiWiki::hook(type => "cgi", id => "skeleton",
  21. call => \&cgi);
  22. } # }}}
  23. sub checkconfig () { #{{{
  24. IkiWiki::debug("skeleton plugin checkconfig");
  25. } #}}}
  26. sub preprocess (@) { #{{{
  27. my %params=@_;
  28. return "skeleton plugin result";
  29. } # }}}
  30. sub filter ($) { #{{{
  31. my $content=shift;
  32. IkiWiki::debug("skeleton plugin running as filter");
  33. return $content;
  34. } # }}}
  35. sub delete (@) { #{{{
  36. my @files=@_;
  37. IkiWiki::debug("skeleton plugin told that files were deleted: @files");
  38. } #}}}
  39. sub change (@) { #{{{
  40. my @files=@_;
  41. IkiWiki::debug("skeleton plugin told that changed files were rendered: @files");
  42. } #}}}
  43. sub cgi ($) { #{{{
  44. my $cgi=shift;
  45. IkiWiki::debug("skeleton plugin running in cgi");
  46. } #}}}
  47. 1