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");
} # }}}
sub scan(@){
my %params=@_;
my $page=$params{page};
+
+ my $linktext=$config{url}.'/mailbox.css';
push @{$metaheaders{$page}},
- '<link rel="stylesheet" href="mailbox.css" type="text/css"/>'
+ '<link rel="stylesheet" href="'.$linktext.'" type="text/css"/>'
}
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