aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins/write.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-03-28 18:41:47 -0400
committerJoey Hess <joey@kitenet.net>2012-03-28 18:43:07 -0400
commitd68d25526816d40048ca47ad360304bce162b659 (patch)
tree30230ad338c5e9a4d2574cab844399b2ddf3d075 /doc/plugins/write.mdwn
parent1916f974722ff509e44c16b4c07c054ef9a11f96 (diff)
downloadikiwiki-d68d25526816d40048ca47ad360304bce162b659.tar
ikiwiki-d68d25526816d40048ca47ad360304bce162b659.tar.gz
Added a "changes" hook. Renamed the "change" hook to "rendered", but
the old hook name is called for now for back-compat.
Diffstat (limited to 'doc/plugins/write.mdwn')
-rw-r--r--doc/plugins/write.mdwn19
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index cc5f6e5ed..4c66e51f8 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -376,17 +376,28 @@ the second is a log message resembling
hook(type => "delete", id => "foo", call => \&delete);
-Each time a page or pages is removed from the wiki, the referenced function
+After a page or pages is removed from the wiki, the referenced function
is called, and passed the names of the source files that were removed.
-### change
+### rendered
- hook(type => "change", id => "foo", call => \&render);
+ hook(type => "rendered", id => "foo", call => \&rendered);
-Each time ikiwiki renders a change or addition (but not deletion) to the
+After ikiwiki renders a change or addition (but not deletion) to the
wiki, the referenced function is called, and passed the names of the
source files that were rendered.
+(This hook used to be called "change", but that was not accurate.
+For now, plugins using the old hook name will still work.)
+
+### changes
+
+ hook(type => "changes", id => "foo", call => \&changes);
+
+After ikiwiki renders changes to the wiki, the referenced function is
+called, and passed the names of the source files that were added, modified,
+or deleted.
+
### cgi
hook(type => "cgi", id => "foo", call => \&cgi);