X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/6c89a635bb0715fd06b0061692fe39b3e79fcad7..844e3a549a1b9b96b4424af90dacd82ec18a8fa4:/doc/plugins/write.mdwn diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 0c192eb64..0e1839c6c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -412,7 +412,8 @@ control some options. These are: * forcesubpage - set to force a link to a subpage * linktext - set to force the link text to something * anchor - set to make the link include an anchor -* rel - set to add a rel attribute to the link. +* rel - set to add a rel attribute to the link +* class - set to add a css class to the link #### `readfile($;$)` @@ -448,6 +449,10 @@ destination directory), register that the page will result in that file being rendered. It's important to call this before writing to any file in the destination directory. +Ikiwiki uses this information to automatically clean up rendered files when +the page that rendered them goes away or is changes to no longer render +them. will_render also does a few important security checks. + #### `pagetype($)` Given the name of a source file, returns the type of page it is, if it's @@ -461,8 +466,16 @@ that corresponds to that file. #### `srcfile($)` Given the name of a source file in the wiki, searches for the file in -the source directory and the underlay directory, and returns the full -path to the first file found. +the source directory and the underlay directories (most recently added +underlays first), and returns the full path to the first file found. + +#### `add_underlay($)` + +Adds a directory to the set of underlay directories that ikiwiki will +search for files. + +If the directory name is not absolute, ikiwiki will assume it is in +the parent directory of the configured underlaydir. #### `displaytime($)`