summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 22:31:20 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 22:31:20 +0000
commit8d4c474f3b92ed2d0e8f968e34a5c6d9d30921fe (patch)
tree58129fd2cda3ab6a61e2f0536f4b6ec9c59c6ad7
parentaf029154d6b145302f8ece0286711f61ea606877 (diff)
* 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.
-rw-r--r--IkiWiki/Plugin/html.pm18
-rw-r--r--debian/changelog7
-rw-r--r--doc/plugins/html.mdwn8
3 files changed, 32 insertions, 1 deletions
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 <joeyh@debian.org> Mon, 3 Jul 2006 18:06:49 -0400
+ -- Joey Hess <joeyh@debian.org> 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.