summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-23 18:14:20 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-23 18:14:20 -0400
commit4691a2ad39cce273231fddd9a589b4f8fdc1b063 (patch)
treeff28f45d29dc3864d20298941e4389bd10f7e7f0 /doc/plugins
parent96dab37a8e3acc58fb0ab5be0657c0e545e9684a (diff)
add renamepage hooks
Implemented for regular wikilinks, with a test suite.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/write.mdwn9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 12bd33662..3dd8bdaa1 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -348,6 +348,15 @@ This hook is called whenever ikiwiki normally saves its state, just before
the state is saved. The function can save other state, modify values before
they're saved, etc.
+## renamepage
+
+ hook(type => "renamepage", id => "foo", call => \&renamepage);
+
+This hook is called by the [[plugins/rename]] plugin when it renames
+something. The hook is passed named parameters: `page`, `oldpage`,
+`newpage`, and `content`, and should try to modify the content to reflect
+the name change. For example, by converting links to point to the new page.
+
## Plugin interface
To import the ikiwiki plugin interface: