]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Add a textile format plugin contributed by mazirian.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 29 Dec 2006 05:18:39 +0000 (05:18 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 29 Dec 2006 05:18:39 +0000 (05:18 +0000)
IkiWiki/Plugin/textile.pm [new file with mode: 0644]
debian/changelog
doc/features.mdwn
doc/plugins/contrib/textile.mdwn [deleted file]
doc/plugins/textile.mdwn [new file with mode: 0644]

diff --git a/IkiWiki/Plugin/textile.pm b/IkiWiki/Plugin/textile.pm
new file mode 100644 (file)
index 0000000..ee8e88e
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+# By mazirian; GPL license
+# Textile markup
+
+package IkiWiki::Plugin::textile;
+
+use warnings;
+use strict;
+use IkiWiki;
+
+sub import { #{{{
+       hook(type => "htmlize", id => "txtl", call => \&htmlize);
+} # }}}
+
+sub htmlize (@) { #{{{
+       my %params=@_;
+       my $content = $params{content};
+
+       eval q{use Text::Textile};
+       return $content if $@;
+       return Text::Textile::textile($content);
+} # }}}
+
+1
index 50d970bb80603333e540ff6d6bbb7cb12d39616f..9d6b7a42a7539d83779769945cdadb3e3e1ea062 100644 (file)
@@ -19,8 +19,9 @@ ikiwiki (1.37) UNRELEASED; urgency=low
   * Export gettext() from IkiWiki module.
   * Don't put discussion links on discussion pages.
   * Allow disabling of plugins included in goodstuff.
   * Export gettext() from IkiWiki module.
   * Don't put discussion links on discussion pages.
   * Allow disabling of plugins included in goodstuff.
+  * Add a textile format plugin contributed by mazirian.
 
 
- -- Joey Hess <joeyh@debian.org>  Thu, 28 Dec 2006 23:49:11 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri, 29 Dec 2006 00:17:58 -0500
 
 ikiwiki (1.36) unstable; urgency=low
 
 
 ikiwiki (1.36) unstable; urgency=low
 
index 05aeebfc9cf93ef15244af1445422c62b6f0e7c5..966fea98f10b8c822259fe8f9b0ffa4e6fb9293d 100644 (file)
@@ -39,7 +39,8 @@ provided by ikiwiki on top of regular markdown is the [[WikiLink]] and
 If you prefer to use some other markup language, ikiwiki allows others to
 easily be added by [[plugins]]. For example it also supports traditional
 [[plugins/WikiText]] formatted pages, pages written as pure
 If you prefer to use some other markup language, ikiwiki allows others to
 easily be added by [[plugins]]. For example it also supports traditional
 [[plugins/WikiText]] formatted pages, pages written as pure
-[[plugins/HTML]], or pages written in [[reStructuredText|plugins/rst]].
+[[plugins/HTML]], or pages written in [[reStructuredText|plugins/rst]]
+or [[Textile|plugins/textile]].
 
 ikiwiki also supports files of any other type, including plain text,
 images, etc. These are not converted to wiki pages, they are just copied
 
 ikiwiki also supports files of any other type, including plain text,
 images, etc. These are not converted to wiki pages, they are just copied
diff --git a/doc/plugins/contrib/textile.mdwn b/doc/plugins/contrib/textile.mdwn
deleted file mode 100644 (file)
index 953382b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-[[template id=plugin name=syntax author="mazirian"]]
-[[tag type/format]]
-[[meta title="textile (third-party plugin)"]]
-
-Textile is a veratile markup language.  So here's a trivial (in that it is a
-direct adaptation of the wikitext plugin) plugin that will use the Textile 
-markup language to render .txtl files in your data directory.  You must have 
-[[cpan Text::Textile]] installed for it to work. Naturally, it is released under
-the terms of the GPL.
-
-Download: [textile.pm](http://mazirian.com/files/textile.pm) (December 28,
-2006)
diff --git a/doc/plugins/textile.mdwn b/doc/plugins/textile.mdwn
new file mode 100644 (file)
index 0000000..6ffec41
--- /dev/null
@@ -0,0 +1,6 @@
+[[template id=plugin name=syntax author="mazirian"]]
+[[tag type/format]]
+
+Textile is a veratile markup language. So here's a plugin that will use the
+Textile  markup language to render .txtl files in your data directory. 
+You must have [[cpan Text::Textile]] installed for it to work.