summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-29 20:50:20 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-29 20:50:20 +0000
commit48f9d393393709d8e998a9eb8d4095773ab185a1 (patch)
tree81a1ed88811689edf59f081efffa78d86e1bf1b9 /doc
parentaa8bf534d938a65d0fd3db813c52c05ed28099f8 (diff)
* htmltidy plugin from Faidon.
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki.setup2
-rw-r--r--doc/patchqueue/html_tidy_plugin.mdwn38
-rw-r--r--doc/plugins/htmltidy.mdwn5
3 files changed, 6 insertions, 39 deletions
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index b52f1ad39..9310a4556 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -75,7 +75,7 @@ use IkiWiki::Setup::Standard {
# To add plugins, list them here.
#add_plugins => [qw{meta tag pagecount brokenlinks search smiley
- # wikitext camelcase pagestats}],
+ # wikitext camelcase pagestats htmltidy}],
# If you want to disable any of the default plugins, list them here.
#disable_plugins => [qw{inline htmlscrubber}],
}
diff --git a/doc/patchqueue/html_tidy_plugin.mdwn b/doc/patchqueue/html_tidy_plugin.mdwn
deleted file mode 100644
index a8b9f2728..000000000
--- a/doc/patchqueue/html_tidy_plugin.mdwn
+++ /dev/null
@@ -1,38 +0,0 @@
-Obvious and straightforward ;-)
-tidy should be probably added to Suggests -- doc/ikiwiki.setup should also be updated.
-(yes, I'm too lazy today...)
-
--- [[Faidon]]
-
----
-
- #!/usr/bin/perl
- # HTML Tidy plugin
- # requires 'tidy' binary, found in Debian or http://tidy.sf.net/
- # mostly a proof-of-concept on how to use external filters.
- # It is particularly useful when the html plugin is used.
- package IkiWiki::Plugin::tidy;
-
- use warnings;
- use strict;
- use IkiWiki;
- use IPC::Open2;
-
- sub import { #{{{
- IkiWiki::hook(type => "sanitize", id => "tidy", call => \&sanitize);
- } # }}}
-
- sub sanitize ($) { #{{{
- open2(*IN, *OUT, 'tidy -quiet -xml -indent -utf8') or return shift;
- # open2 doesn't respect "use open ':utf8'"
- binmode (IN, ':utf8');
- binmode (OUT, ':utf8');
-
- print OUT shift;
- close OUT;
-
- local $/ = undef;
- return <IN>;
- } # }}}
-
- 1 \ No newline at end of file
diff --git a/doc/plugins/htmltidy.mdwn b/doc/plugins/htmltidy.mdwn
new file mode 100644
index 000000000..2c6f7b7fe
--- /dev/null
+++ b/doc/plugins/htmltidy.mdwn
@@ -0,0 +1,5 @@
+This plugin uses [tidy](http://tidy.sourceforge.net/) to tidy up the html
+emitted by ikiwiki. Besides being nicely formatted, this helps ensure that
+even if users enter suboptimal html, your wiki generates 100% valid html.
+
+This plugin is included in ikiwiki, but is not enabled by default.