From: Joey Hess Date: Tue, 29 Jan 2008 18:07:17 +0000 (-0500) Subject: document the new refresh hook X-Git-Tag: 2.30~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95c5cbc721a2382104810e3b4f2bd13b8a56558f;p=ikiwiki.git document the new refresh hook --- diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 76fa3f0d7..9e27cc27f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -82,11 +82,19 @@ configuration. It's called early in the startup process. The function is passed no values. It's ok for the function to call `error()` if something isn't configured right. +### refresh + + hook(type => "refresh", id => "foo", call => \&refresh); + +This hook is called just before ikiwiki scans the wiki for changed files. +It's useful for plugins that need to create or modify a source page. The +function is passed no values. + ### needsbuild hook(type => "needsbuild", id => "foo", call => \&needsbuild); -This allows a plugin the manipulate the list of files that need to be +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 pages that will be rebuilt, and can modify the array, either adding or removing files from it.