]> sipb.mit.edu Git - ikiwiki.git/commitdiff
creole: New plugin from Bernd Zeimetz. Closes: #486930
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 19 Jun 2008 23:11:03 +0000 (19:11 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 19 Jun 2008 23:11:18 +0000 (19:11 -0400)
IkiWiki/Plugin/creole.pm [new file with mode: 0644]
debian/changelog
debian/copyright
doc/plugins/creole.mdwn [new file with mode: 0644]
doc/todo/support_creole_markup.mdwn

diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm
new file mode 100644 (file)
index 0000000..f7f7a61
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+# WikiCreole markup
+# based on the WikiText plugin.
+package IkiWiki::Plugin::creole;
+
+use warnings;
+use strict;
+use IkiWiki 2.00;
+
+sub import { #{{{
+       hook(type => "htmlize", id => "creole", call => \&htmlize);
+} # }}}
+
+sub htmlize (@) { #{{{
+       my %params=@_;
+       my $content = $params{content};
+
+       eval q{use Text::WikiCreole};
+       return $content if $@;
+       return Text::WikiCreole::creole_parse($content);
+} # }}}
+
+1
index 687c91113925903f60982e928b25ec9a25da3dca..6de03f8b480bce559863b1952a4caaf40cf732be 100644 (file)
@@ -15,6 +15,7 @@ ikiwiki (2.51) UNRELEASED; urgency=low
   * Version the suggests of xapian-omega to a version known to be new enough
     to work with ikiwiki. Reportedly, version 0.9.9 is too old to work.
     Closes: #486592
+  * creole: New plugin from Bernd Zeimetz. Closes: #486930
 
  -- Joey Hess <joeyh@debian.org>  Sun, 15 Jun 2008 15:03:33 -0400
 
index d461bff29cfd8080b123678500dd4a2c5b9022b1..2a7bbedf545e313fe8a5b739e69523c92f6af04f 100644 (file)
@@ -92,6 +92,10 @@ Files: hnb.pm
 Copyright: Copyright (C) 2008 Axel Beckert <abe@deuxchevaux.org>
 License: GPL-2+
 
+Files: creole.pm
+Copyright: Copyright (C) 2008 Bernd Zeimetz <bernd@bzed.de>
+License: GPL-2+
+
 Files: doc/logo/*
 Copyright: © 2006 Recai Oktaş <roktas@debian.org>
 License: GPL-2+
diff --git a/doc/plugins/creole.mdwn b/doc/plugins/creole.mdwn
new file mode 100644 (file)
index 0000000..b2496ad
--- /dev/null
@@ -0,0 +1,16 @@
+[[template id=plugin name=creole author="BerndZeimetz"]]
+[[tag type/format]]
+
+This plugin allows ikiwiki to process pages written in
+[WikiCreole](http://www.wikicreole.org/) format.
+To use it, you need to have the [[cpan Text::WikiCreole]] perl
+module installed, enable the plugin, then files with the extention `.creole`
+will be processed as creole.
+
+The creole format is based on common elements across many different
+wiki markup formats, so should be fairly easy to guess at. There is also a
+[CheatSheet](http://www.wikicreole.org/wiki/CheatSheet).
+
+Links are standard [[WikiLinks|ikiwiki/WikiLink]]. Links and
+[[PreProcessorDirectives]] inside `{{{ }}}` blocks are still expanded,
+since this happens before the creole format is processed.
index 40157d94f722cb228fec0d6ce8059e7ed2fcf2e8..b0ebf5b9e6ae5b51c99d2fa004af2aafc5323b36 100644 (file)
@@ -14,3 +14,5 @@ Syntax file for vim: http://www.peter-hoffmann.com/code/vim/  (Since a typical i
 
 > Should be pretty easy to add a plugin to do it using [[cpan
 > Text::WikiCreole]]. --[[Joey]]
+
+[[done]]