summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/creole.pm23
-rw-r--r--debian/changelog1
-rw-r--r--debian/copyright4
-rw-r--r--doc/plugins/creole.mdwn16
-rw-r--r--doc/todo/support_creole_markup.mdwn2
5 files changed, 46 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm
new file mode 100644
index 000000000..f7f7a61e3
--- /dev/null
+++ b/IkiWiki/Plugin/creole.pm
@@ -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
diff --git a/debian/changelog b/debian/changelog
index 687c91113..6de03f8b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/debian/copyright b/debian/copyright
index d461bff29..2a7bbedf5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -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
index 000000000..b2496adad
--- /dev/null
+++ b/doc/plugins/creole.mdwn
@@ -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.
diff --git a/doc/todo/support_creole_markup.mdwn b/doc/todo/support_creole_markup.mdwn
index 40157d94f..b0ebf5b9e 100644
--- a/doc/todo/support_creole_markup.mdwn
+++ b/doc/todo/support_creole_markup.mdwn
@@ -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]]