]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
rework dependency types code
[ikiwiki.git] / doc / plugins / write.mdwn
index 668f8d8b69dff65acc0727fa5fa3233e516b132a..73db6f12abfc5432d132a1a77ba2023b05ee79b9 100644 (file)
@@ -609,10 +609,20 @@ page created from it. (Ie, it appends ".html".)
 Use this when constructing the filename of a html file. Use `urlto` when
 generating a link to a page.
 
-#### `add_depends($$)`
+#### `add_depends($$;@)`
 
 Makes the specified page depend on the specified [[ikiwiki/PageSpec]].
 
+By default, dependencies are full content dependencies, meaning that the
+page will be updated whenever anything matching the PageSpec is modified.
+This default can be overridden by additional named parameters, which can be
+used to indicate weaker types of dependencies:
+
+* `presence` if set to true, only the presence of a matching page triggers
+  the dependency.
+* `links` if set to true, any change in the text of links on a matching page
+  triggers the dependency
+
 #### `pagespec_match($$;@)`
 
 Passed a page name, and [[ikiwiki/PageSpec]], returns true if the