]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/postsparkline.pm
Added Tim Skirvin's webpage to the list
[git.ikiwiki.info.git] / IkiWiki / Plugin / postsparkline.pm
index 6fc96f8b343cbca8eeeb893c41e2569a962d915c..ba43561fbc0d5f291f3eb80163dc88c9b506effe 100644 (file)
@@ -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;