use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
IkiWiki::loadplugin('sparkline');
+ hook(type => "getsetup", id => "postsparkline", call => \&getsetup);
hook(type => "preprocess", id => "postsparkline", call => \&preprocess);
-} # }}}
+}
+
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+}
-sub preprocess (@) { #{{{
+sub preprocess (@) {
my %params=@_;
if (! exists $params{max}) {
delete $params{color};
return IkiWiki::Plugin::sparkline::preprocess(%params,
map { $_.$color => "" } reverse @data);
-} # }}}
+}
sub perfoo ($@) {
my $sub=shift;