From: joey Date: Mon, 3 Jul 2006 22:31:20 +0000 (+0000) Subject: * Add a html plugin, which can be used to write wikis in raw html, X-Git-Tag: 1.8~23 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/8d4c474f3b92ed2d0e8f968e34a5c6d9d30921fe * 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. --- 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 diff --git a/debian/changelog b/debian/changelog index 1fafe4168..b95b6b768 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,8 +29,13 @@ ikiwiki (1.8) UNRELEASED; urgency=low are added. * Support htmlize plugins and make mdwn one such plugin, which is enabled by default (of course!). Based on a patch by Faidon Liambotis. + * 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. - -- Joey Hess Mon, 3 Jul 2006 18:06:49 -0400 + -- Joey Hess Mon, 3 Jul 2006 18:15:30 -0400 ikiwiki (1.7) unstable; urgency=low diff --git a/doc/plugins/html.mdwn b/doc/plugins/html.mdwn new file mode 100644 index 000000000..01e366c49 --- /dev/null +++ b/doc/plugins/html.mdwn @@ -0,0 +1,8 @@ +This plugin lets raw html pages be used as source pages for the wiki. The +html pages will still be wrapped in the same html template as any other +page, so for best results you should include only the page body in the html +file. Also, if the htmlscrubber plugin is enabled, the html pages will be +sanitised like any other page. You can also use standard [[WikiLinks]] etc +in the html pages. + +This plugin is included in ikiwiki, but is not enabled by default.