]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/skeleton.pm
* Add toc (table of contents) plugin.
[ikiwiki.git] / IkiWiki / Plugin / skeleton.pm
index e63bab6d76e04fed3e6b22e5fce0b7ca69ced692..4683b00ba707a51809001dd3baa79f6068a1bf3c 100644 (file)
@@ -21,6 +21,8 @@ sub import { #{{{
                call => \&htmlize);
        IkiWiki::hook(type => "sanitize", id => "skeleton", 
                call => \&sanitize);
+       IkiWiki::hook(type => "format", id => "skeleton", 
+               call => \&format);
        IkiWiki::hook(type => "pagetemplate", id => "skeleton", 
                call => \&pagetemplate);
        IkiWiki::hook(type => "delete", id => "skeleton", 
@@ -29,7 +31,7 @@ sub import { #{{{
                call => \&change);
        IkiWiki::hook(type => "cgi", id => "skeleton", 
                call => \&cgi);
-       IkiWiki::hook(type => "cgi", id => "savestate", 
+       IkiWiki::hook(type => "savestate", id => "savestate", 
                call => \&savestate);
 } # }}}
 
@@ -71,6 +73,14 @@ sub sanitize ($) { #{{{
        return $content;
 } # }}}
 
+sub format ($) { #{{{
+       my $content=shift;
+       
+       IkiWiki::debug("skeleton plugin running as a formatter");
+
+       return $content;
+} # }}}
+
 sub pagetemplate (@) { #{{{
        my %params=@_;
        my $page=$params{page};