--- /dev/null
+#!/usr/bin/perl
+# Include a fortune in a page
+package IkiWiki::Plugin::fortune;
+
+use warnings;
+use strict;
+
+sub import { #{{{
+ IkiWiki::hook(type => "preprocess", id => "fortune",
+ call => \&preprocess);
+} # }}}
+
+sub preprocess (@) { #{{{
+ $ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
+ my $f = `fortune`;
+
+ if ($?) {
+ return "[[fortune failed]]";
+ }
+ else {
+ return "<pre>$f</pre>\n";
+ }
+} # }}}
+
+1
--exclude=/discussion --no-discussion \
--plugin=brokenlinks --plugin=pagecount \
--plugin=orphans --plugin=haiku --plugin=meta \
- --plugin=tag --plugin=polygen --plugin=pagestats
+ --plugin=tag --plugin=polygen --plugin=pagestats \
+ --plugin=fortune
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
* Allow preprocessor directives to be expanded in inlined blog pages.
However, to avoid inlining loops etc, don't expand inline directives in
inlined pages.
+ * fortune plugin (trivial)
-- Joey Hess <joeyh@debian.org> Sat, 29 Jul 2006 17:12:56 -0400
--- /dev/null
+This just uses the `fortune` program to insert a fortune into the page.
+Usage:
+
+ \[[fortune ]]
+
+This plugin is included in ikiwiki, but not enabled by default.
+
+If this plugin is enabled, here's a fortune for you:
+
+----
+
+[[fortune ]]