]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
Added a rescan hook.
[ikiwiki.git] / doc / plugins / write.mdwn
index bb80123423453c5d01a558569f48924e05fbba55..33532039420f7f3e9a7c9a4857de1b7fe6502dd4 100644 (file)
@@ -194,12 +194,23 @@ them to `%links`. Present in IkiWiki 2.40 and later.
 The function is passed named parameters "page" and "content". Its return
 value is ignored.
 
+### rescan
+
+       hook(type => "rescan", id => "foo", call => \&scan);
+
+This hook is called after the scan hook has been run, as well as the
+preprocess hook in scan mode. It is used to collect additional
+metadata that depends on a first scan to have been performed already.
+
+The function is passed named parameters "page" and "content". Its return
+value is ignored.
+
 ### filter
 
        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 +611,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;`