From: David Bremner Date: Mon, 1 Sep 2008 01:05:26 +0000 (-0300) Subject: initial htmlize hook X-Git-Tag: 0.4~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5db8b5c5a6bcd42f48f27840b49882cedb89386a;p=ikiwiki.git initial htmlize hook --- diff --git a/IkiWiki/Plugin/mailbox.pm b/IkiWiki/Plugin/mailbox.pm index 84648e402..e619eb35f 100644 --- a/IkiWiki/Plugin/mailbox.pm +++ b/IkiWiki/Plugin/mailbox.pm @@ -28,6 +28,7 @@ sub import { #{{{ hook(type => "preprocess", id => "mailbox", call => \&preprocess); hook(type => "scan", id => "mailbox", call => \&scan); hook(type => "pagetemplate", id=>"mailbox", call => \&pagetemplate); + hook(type => "htmlize",id=>"mbox",call => \&mbox_htmlize); IkiWiki::loadplugin("filecheck"); } # }}} @@ -59,6 +60,12 @@ sub preprocess (@) { #{{{ } # }}} +sub mbox_htmlize(@){ + my %params=@_; + + my $path=$config{srcdir} . '/' . $params{page}.".mbox"; + return format_mailbox(path=>$path,type=>'Mbox',destpage=>$params{page}); +} ### The guts of the plugin ### parameters