]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
needsbuild hook interface changed; the hooks should now return the modified array...
[ikiwiki.git] / doc / plugins / write.mdwn
index bb80123423453c5d01a558569f48924e05fbba55..31bb64e68a258eccf046e0900f36fecd15c66034 100644 (file)
@@ -179,8 +179,8 @@ function is passed no values.
 
 This allows a plugin to manipulate the list of files that need to be
 built when the wiki is refreshed. The function is passed a reference to an
-array of files that will be rebuilt, and can modify the array, either
-adding or removing files from it.
+array of files that will be rebuilt. It should return an array reference
+that is a modified version of its input. It can add or remove files from it.
 
 ### scan
 
@@ -198,8 +198,8 @@ value is ignored.
 
        hook(type => "filter", id => "foo", call => \&filter);
 
-Runs on the raw source of a page, before anything else touches it, and can
-make arbitrary changes. The function is passed named parameters "page",
+Runs on the full raw source of a page, before anything else touches it, and
+can make arbitrary changes. The function is passed named parameters "page",
 "destpage", and "content". It should return the filtered content.
 
 ### preprocess
@@ -600,6 +600,13 @@ function of the ikiwiki wrapper when it is being generated.
 The code runs before anything else -- in particular it runs before
 the suid wrapper has sanitized its environment.
 
+### disable
+
+       hook(type => "disable", id => "foo", call => \&disable);
+
+This hook is only run when a previously enabled plugin gets disabled
+during ikiwiki setup. Plugins can use this to perform cleanups.
+
 ## Exported variables
 
 Several variables are exported to your plugin when you `use IkiWiki;`