summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/html.pm
blob: b752075787801a2cc0a557ada55ba6989f67f97a (plain)
  1. #!/usr/bin/perl
  2. # Raw html as a wiki page type.
  3. package IkiWiki::Plugin::html;
  4. use warnings;
  5. use strict;
  6. use IkiWiki 2.00;
  7. sub import { #{{{
  8. hook(type => "getsetup", id => "html", call => \&getsetup);
  9. hook(type => "htmlize", id => "html", call => \&htmlize);
  10. hook(type => "htmlize", id => "htm", call => \&htmlize);
  11. # ikiwiki defaults to skipping .html files as a security measure;
  12. # make it process them so this plugin can take effect
  13. $config{wiki_file_prune_regexps} = [ grep { !m/\\\.x\?html\?\$/ } @{$config{wiki_file_prune_regexps}} ];
  14. } # }}}
  15. sub getsetup () { #{{{
  16. return
  17. plugin => {
  18. safe => 1,
  19. rebuild => 1, # format plugin
  20. },
  21. } #}}}
  22. sub htmlize (@) { #{{{
  23. my %params=@_;
  24. return $params{content};
  25. } #}}}
  26. 1