2 # Include a fortune in a page
3 package IkiWiki::Plugin::fortune;
10 hook(type => "preprocess", id => "fortune", call => \&preprocess);
13 sub preprocess (@) { #{{{
14 $ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
15 my $f = `fortune 2>/dev/null`;
18 error gettext("fortune failed");
21 return "<pre>$f</pre>\n";