summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/skeleton.pm
blob: d6d8cc0eddf588804519895d7355941c5d1ed9df (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 => "delete", id => "skeleton",
  15. call => \&delete);
  16. IkiWiki::hook(type => "render", id => "skeleton",
  17. call => \&render);
  18. IkiWiki::hook(type => "cgi", id => "skeleton",
  19. call => \&cgi);
  20. } # }}}
  21. sub checkconfig () { #{{{
  22. IkiWiki::debug("skeleton plugin checkconfig");
  23. } #}}}
  24. sub preprocess (@) { #{{{
  25. my %params=@_;
  26. return "skeleton plugin result";
  27. } # }}}
  28. sub delete (@) { #{{{
  29. my @files=@_;
  30. IkiWiki::debug("skeleton plugin told that files were deleted: @files");
  31. } #}}}
  32. sub render (@) { #{{{
  33. my @files=@_;
  34. IkiWiki::debug("skeleton plugin told that files were rendered: @files");
  35. } #}}}
  36. sub cgi ($) { #{{{
  37. my $cgi=shift;
  38. IkiWiki::debug("skeleton plugin running in cgi");
  39. } #}}}
  40. 1