X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a65d312467c5ab179ecf4aa715790f371a46634a..aff9bf5a7ab21ea303c4882272e76630d05d40f2:/IkiWiki/Plugin/postsparkline.pm diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index 6fc96f8b3..ba43561fb 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -3,14 +3,23 @@ package IkiWiki::Plugin::postsparkline; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.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}) { @@ -69,7 +78,7 @@ sub preprocess (@) { #{{{ delete $params{color}; return IkiWiki::Plugin::sparkline::preprocess(%params, map { $_.$color => "" } reverse @data); -} # }}} +} sub perfoo ($@) { my $sub=shift;