Commit | Line | Data |
---|---|---|
8d4c474f | 1 | #!/usr/bin/perl |
2 | # Raw html as a wiki page type. | |
3 | package IkiWiki::Plugin::html; | |
4 | ||
5 | use warnings; | |
6 | use strict; | |
ee1ad53c | 7 | use IkiWiki 2.00; |
8d4c474f | 8 | |
9 | sub 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 |
19 | sub getsetup () { #{{{ |
20 | return | |
21 | plugin => { | |
22 | safe => 1, | |
23 | rebuild => 1, # format plugin | |
24 | }, | |
25 | } #}}} | |
26 | ||
4895955c | 27 | sub htmlize (@) { #{{{ |
28 | my %params=@_; | |
29 | return $params{content}; | |
30 | } #}}} | |
31 | ||
8d4c474f | 32 | 1 |