From 8d4c474f3b92ed2d0e8f968e34a5c6d9d30921fe Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 3 Jul 2006 22:31:20 +0000 Subject: * Add a html plugin, which can be used to write wikis in raw html, if you'd ever want to do such a thing. Slightly tricky, since ikiwiki defaults to not processing .html files, since w/o this plugin they would be copied unsanitised. With this plugin, it will process, and html sanitise, them like any other page type. --- IkiWiki/Plugin/html.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 IkiWiki/Plugin/html.pm (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/html.pm b/IkiWiki/Plugin/html.pm new file mode 100644 index 000000000..6bf813292 --- /dev/null +++ b/IkiWiki/Plugin/html.pm @@ -0,0 +1,18 @@ +#!/usr/bin/perl +# Raw html as a wiki page type. +package IkiWiki::Plugin::html; + +use warnings; +use strict; +use IkiWiki; + +sub import { #{{{ + IkiWiki::hook(type => "htmlize", id => "html", call => sub { shift }); + IkiWiki::hook(type => "htmlize", id => "htm", call => sub { shift }); + + # ikiwiki defaults to skipping .html files as a security measure; + # make it process them so this plugin can take effect + $IkiWiki::config{wiki_file_prune_regexp} =~ s/\|\\\.html\?\$//; +} # }}} + +1 -- cgit v1.2.3