]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/skeleton.pm.example
po plugin: build %translations in needsbuild hook rather than scan
[ikiwiki.git] / IkiWiki / Plugin / skeleton.pm.example
index 10c7002e478919ca5b84a74549350ecc815a5377..ecf2a2407ca135d91503b4ebe3ed27d7bebf89f3 100644 (file)
@@ -10,6 +10,7 @@ use IkiWiki 2.00;
 
 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);
@@ -33,12 +34,29 @@ sub import { #{{{
        hook(type => "formbuilder_setup", id => "skeleton", call => \&formbuilder_setup);
        hook(type => "formbuilder", id => "skeleton", call => \&formbuilder);
        hook(type => "savestate", id => "skeleton", call => \&savestate);
+       hook(type => "targetpage", id => "skeleton", call => \&targetpage);
+       hook(type => "urlpath", id => "skeleton", call => \&urlpath);
 } # }}}
 
 sub 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");
 } #}}}
@@ -149,7 +167,7 @@ sub auth ($$) { #{{{
        debug("skeleton plugin running in auth");
 } #}}}
 
-sub sessionncgi ($$) { #{{{
+sub sessioncgi ($$) { #{{{
        my $cgi=shift;
        my $session=shift;
 
@@ -188,4 +206,12 @@ sub savestate () { #{{{
        debug("skeleton plugin running in savestate");
 } #}}}
 
+sub targetpage () { #{{{
+       debug("skeleton plugin running in targetpage");
+} #}}}
+
+sub urlpath () { #{{{
+       debug("skeleton plugin running in urlpath");
+} #}}}
+
 1