summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/skeleton.pm
blob: cae4c02ece0baa0f98da892aec943dd1f84b7e1d (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 => "render", id => "skeleton",
  19. call => \&render);
  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 render (@) { #{{{
  40. my @files=@_;
  41. IkiWiki::debug("skeleton plugin told that files were rendered: @files");
  42. } #}}}
  43. sub cgi ($) { #{{{
  44. my $cgi=shift;
  45. IkiWiki::debug("skeleton plugin running in cgi");
  46. } #}}}
  47. 1