]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/write.mdwn
add news item for ikiwiki 1.17
[git.ikiwiki.info.git] / doc / plugins / write.mdwn
index 79bd75e9b8583d0e5fa13769b22f3a7b924cd979..6d90543895f95baa393b312bc31d4a5bf91adcdc 100644 (file)
@@ -129,10 +129,20 @@ to set it, as setting a variable that's not present is an error.
        IkiWiki::hook(type => "sanitize", id => "foo", call => \&sanitize);
 
 Use this to implement html sanitization or anything else that needs to
        IkiWiki::hook(type => "sanitize", id => "foo", call => \&sanitize);
 
 Use this to implement html sanitization or anything else that needs to
-modify the content of a page after it has been fully converted to html.
+modify the body of a page after it has been fully converted to html.
 The function is passed the page content and should return the sanitized
 content.
 
 The function is passed the page content and should return the sanitized
 content.
 
+## format
+
+       IkiWiki::hook(type => "format", id => "foo", call => \&format);
+
+The function is passed the complete page content and can reformat it
+and return the new content. The difference between format and sanitize is
+that sanitize only acts on the page body, while format can modify the
+entire html page including the header and footer inserted by ikiwiki, the
+html document type, etc.
+
 ## delete
 
        IkiWiki::hook(type => "delete", id => "foo", call => \&delete);
 ## delete
 
        IkiWiki::hook(type => "delete", id => "foo", call => \&delete);