]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
Added a rescan hook.
[ikiwiki.git] / doc / plugins / write.mdwn
index a921b9a0272098e191987c80066c6e7931cafa2e..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
@@ -595,7 +606,17 @@ describes the plugin as a whole. For example:
        hook(type => "genwrapper", id => "foo", call => \&genwrapper);
 
 This hook is used to inject C code (which it returns) into the `main`
-function of the ikiwiki wrapper when it is being generated.
+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