]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Added a ddate plugin.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 27 Aug 2006 03:55:45 +0000 (03:55 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 27 Aug 2006 03:55:45 +0000 (03:55 +0000)
IkiWiki/Plugin/ddate.pm [new file with mode: 0644]
debian/changelog
doc/plugins/htmltidy.mdwn
doc/plugins/rst.mdwn
doc/plugins/type/slow.mdwn [new file with mode: 0644]

diff --git a/IkiWiki/Plugin/ddate.pm b/IkiWiki/Plugin/ddate.pm
new file mode 100644 (file)
index 0000000..c8cf3f6
--- /dev/null
@@ -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
index a2320c1e0c1d12a39d4467041c0e2bfbac1cc9a9..7636cd12e39b73f465a521099486b646c70d8f90 100644 (file)
@@ -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.
   * 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
 
 
 ikiwiki (1.21) unstable; urgency=low
 
index 1949e77e6020436a44f950082f3d65d468589ce9..7079a7fc6694b185f20fe439498006e23645792b 100644 (file)
@@ -1,5 +1,6 @@
 [[template id=plugin name=htmltidy included=1 author="Faidon Liambotis"]]
 [[tag type/html]]
 [[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
 
 This plugin uses [tidy](http://tidy.sourceforge.net/) to tidy up the html
 emitted by ikiwiki. Besides being nicely formatted, this helps ensure that
index 48c896857492e04462b7e517b108415a96944b8a..969d71cdb0ec0c36885b8b39903b16f39ac1a50e 100644 (file)
@@ -1,5 +1,6 @@
 [[template id=plugin name=rst included=1 author="Sergio Talens-Oliag"]]
 [[tag type/format]]
 [[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)
 
 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 (file)
index 0000000..c0e7215
--- /dev/null
@@ -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.