]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/calendar.pm
po: finish abstracting %filtered by putting it into a blackbox
[git.ikiwiki.info.git] / IkiWiki / Plugin / calendar.pm
index aed087eed58248d5da153543dba03abba17b5ef0..6d536a91bb63a6e0a32f399844115e52208d5bdf 100644 (file)
@@ -30,10 +30,26 @@ my $time=time;
 my @now=localtime($time);
 
 sub import { #{{{
 my @now=localtime($time);
 
 sub import { #{{{
-       hook(type => "needsbuild", id => "version", call => \&needsbuild);
+       hook(type => "getsetup", id => "calendar", call => \&getsetup);
+       hook(type => "needsbuild", id => "calendar", call => \&needsbuild);
        hook(type => "preprocess", id => "calendar", call => \&preprocess);
 } #}}}
 
        hook(type => "preprocess", id => "calendar", call => \&preprocess);
 } #}}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+               archivebase => {
+                       type => "string",
+                       example => "archives",
+                       description => "base of the archives hierarchy",
+                       safe => 1,
+                       rebuild => 1,
+               },
+} #}}}
+
 sub is_leap_year (@) { #{{{
        my %params=@_;
        return ($params{year} % 4 == 0 && (($params{year} % 100 != 0) || $params{year} % 400 == 0));
 sub is_leap_year (@) { #{{{
        my %params=@_;
        return ($params{year} % 4 == 0 && (($params{year} % 100 != 0) || $params{year} % 400 == 0));