add plugin safe/rebuild info (part 3 of 3)
[ikiwiki.git] / IkiWiki / Plugin / skeleton.pm.example
index 10c7002e478919ca5b84a74549350ecc815a5377..7878d7c2b09a7eda151d22f07e9da107a1b60154 100644 (file)
@@ -10,6 +10,7 @@ use IkiWiki 2.00;
 
 sub import { #{{{
        hook(type => "getopt", id => "skeleton",  call => \&getopt);
 
 sub import { #{{{
        hook(type => "getopt", id => "skeleton",  call => \&getopt);
+       hook(type => "getsetup", id => "skeleton",  call => \&getsetup);
        hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
        hook(type => "refresh", id => "skeleton", call => \&refresh);
        hook(type => "needsbuild", id => "skeleton", call => \&needsbuild);
        hook(type => "checkconfig", id => "skeleton", call => \&checkconfig);
        hook(type => "refresh", id => "skeleton", call => \&refresh);
        hook(type => "needsbuild", id => "skeleton", call => \&needsbuild);
@@ -39,6 +40,21 @@ sub getopt () { #{{{
        debug("skeleton plugin getopt");
 } #}}}
 
        debug("skeleton plugin getopt");
 } #}}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+               skeleton => {
+                       type => "boolean",
+                       example => 0,
+                       description => "example option",
+                       safe => 0,
+                       rebuild => 0,
+               },
+} #}}}
+
 sub checkconfig () { #{{{
        debug("skeleton plugin checkconfig");
 } #}}}
 sub checkconfig () { #{{{
        debug("skeleton plugin checkconfig");
 } #}}}