document the new refresh hook

master
Joey Hess 2008-01-29 13:07:17 -05:00
parent 5696b35801
commit 95c5cbc721
1 changed files with 9 additions and 1 deletions

View File

@ -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 function is passed no values. It's ok for the function to call
`error()` if something isn't configured right. `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 ### needsbuild
hook(type => "needsbuild", id => "foo", call => \&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 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 array of pages that will be rebuilt, and can modify the array, either
adding or removing files from it. adding or removing files from it.