]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
fix feed urls
[ikiwiki.git] / doc / plugins / write.mdwn
index 22bd5d114872a62e80f29c7e3ab9d6bdf10f3a42..7c28088ded55f9fce9b9012e9c31f9e72814145e 100644 (file)
@@ -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:
@@ -573,12 +582,15 @@ time.
 
 This is the standard gettext function, although slightly optimised.
 
-#### `urlto($$)`
+#### `urlto($$;$)`
 
 Construct a relative url to the first parameter from the page named by the
 second. The first parameter can be either a page name, or some other
 destination file, as registered by `will_render`.
 
+If the third parameter is passed and is true, an absolute url will be
+constructed instead of the default relative url.
+
 #### `targetpage($$)`
 
 Passed a page and an extension, returns the filename that page will be
@@ -635,4 +647,5 @@ when imported, populate `$IkiWiki::Setup::raw_setup` with a reference
 to a hash containing all the config items.
 
 By the way, to parse a ikiwiki setup file, a program just needs to
-do something like `use IkiWiki::Setup; my %setup=IkiWiki::Setup::load($filename)`
+do something like:
+`use IkiWiki::Setup; my %setup=IkiWiki::Setup::load($filename)`