summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/ddate.pm29
-rw-r--r--debian/changelog3
-rw-r--r--doc/plugins/htmltidy.mdwn1
-rw-r--r--doc/plugins/rst.mdwn1
-rw-r--r--doc/plugins/type/slow.mdwn3
5 files changed, 36 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/ddate.pm b/IkiWiki/Plugin/ddate.pm
new file mode 100644
index 000000000..c8cf3f66e
--- /dev/null
+++ b/IkiWiki/Plugin/ddate.pm
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+# Discordian date support fnord ikiwiki.
+package IkiWiki::Plugin::ddate;
+use IkiWiki;
+use IkiWiki::Render; # so we can redefine it here:
+no warnings;
+
+sub import { #{{{
+ IkiWiki::hook(type => "checkconfig", id => "skeleton",
+ call => \&checkconfig);
+} # }}}
+
+sub checkconfig () { #{{{
+ if (! defined $IkiWiki::config{timeformat} ||
+ $IkiWiki::config{timeformat} eq '%c') {
+ $IkiWiki::config{timeformat}='on %{%A, the %e of %B%}, %Y. %N%nCelebrate %H';
+ }
+} #}}}
+
+sub IkiWiki::displaytime ($) { #{{{
+ my $time=shift;
+ eval q{use POSIX};
+ my $gregorian=POSIX::strftime("%d %m %Y", localtime($time));
+ my $date=`ddate +'$IkiWiki::config{timeformat}' $gregorian`;
+ chomp $date;
+ return $date;
+} #}}}
+
+5
diff --git a/debian/changelog b/debian/changelog
index a2320c1e0..7636cd12e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,8 +34,9 @@ ikiwiki (1.22) UNRELEASED; urgency=low
* Patch from James Westby to allow a description to be set for rss feeds.
* Patch from James Westby to add a template for the search form.
* Cache search form for speedup.
+ * Added a ddate plugin.
- -- Joey Hess <joeyh@debian.org> Sat, 26 Aug 2006 17:51:16 -0400
+ -- Joey Hess <joeyh@debian.org> Sat, 26 Aug 2006 23:48:31 -0400
ikiwiki (1.21) unstable; urgency=low
diff --git a/doc/plugins/htmltidy.mdwn b/doc/plugins/htmltidy.mdwn
index 1949e77e6..7079a7fc6 100644
--- a/doc/plugins/htmltidy.mdwn
+++ b/doc/plugins/htmltidy.mdwn
@@ -1,5 +1,6 @@
[[template id=plugin name=htmltidy included=1 author="Faidon Liambotis"]]
[[tag type/html]]
+[[tag type/slow]]
This plugin uses [tidy](http://tidy.sourceforge.net/) to tidy up the html
emitted by ikiwiki. Besides being nicely formatted, this helps ensure that
diff --git a/doc/plugins/rst.mdwn b/doc/plugins/rst.mdwn
index 48c896857..969d71cdb 100644
--- a/doc/plugins/rst.mdwn
+++ b/doc/plugins/rst.mdwn
@@ -1,5 +1,6 @@
[[template id=plugin name=rst included=1 author="Sergio Talens-Oliag"]]
[[tag type/format]]
+[[tag type/slow]]
This plugin lets ikwiki convert files with names ending in ".rst" to html.
It uses the [reStructuredText](http://docutils.sourceforge.net/rst.html)
diff --git a/doc/plugins/type/slow.mdwn b/doc/plugins/type/slow.mdwn
new file mode 100644
index 000000000..c0e721585
--- /dev/null
+++ b/doc/plugins/type/slow.mdwn
@@ -0,0 +1,3 @@
+These plugins can cause wiki rendering to be significantly slowed down,
+due to things like needing to run an external program for every page
+rendered.