Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[ikiwiki] / IkiWiki / Plugin / html.pm
CommitLineData
8d4c474f 1#!/usr/bin/perl
2# Raw html as a wiki page type.
3package IkiWiki::Plugin::html;
4
5use warnings;
6use strict;
ee1ad53c 7use IkiWiki 2.00;
8d4c474f 8
9sub import { #{{{
903213e6 10 hook(type => "getsetup", id => "html", call => \&getsetup);
dae0f48e 11 hook(type => "htmlize", id => "html", call => \&htmlize);
12 hook(type => "htmlize", id => "htm", call => \&htmlize);
8d4c474f 13
14 # ikiwiki defaults to skipping .html files as a security measure;
15 # make it process them so this plugin can take effect
472dabbb 16 $config{wiki_file_prune_regexps} = [ grep { !m/\\\.x\?html\?\$/ } @{$config{wiki_file_prune_regexps}} ];
8d4c474f 17} # }}}
18
903213e6
JH
19sub getsetup () { #{{{
20 return
21 plugin => {
22 safe => 1,
23 rebuild => 1, # format plugin
24 },
25} #}}}
26
4895955c 27sub htmlize (@) { #{{{
28 my %params=@_;
29 return $params{content};
30} #}}}
31
8d4c474f 321