* Add a textile format plugin contributed by mazirian.

master
joey 2006-12-29 05:18:39 +00:00
parent 5659e9881e
commit 7819f34a50
5 changed files with 34 additions and 14 deletions

View File

@ -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

3
debian/changelog vendored
View 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.
* 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

View 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
[[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

View File

@ -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)

View File

@ -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.