summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/html.pm
blob: a7d5e8ce91af28d9053b9b831564e9b1fc13a7b3 (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 3.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