summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-22 00:34:03 -0400
committerJoey Hess <joey@kitenet.net>2010-04-22 00:34:03 -0400
commit3ee571390e3697a3b738ea6791ac7f07052a709c (patch)
tree71e6fdb1fde1c7f33d70563bd667e605cc3e9b92 /doc/plugins
parent0db4d920aafa0c7a6b53c59e2605230134ed45eb (diff)
parent17a89d3d19f3a04ca2686ff18df127e5afaf9577 (diff)
Merge branch 'autotag'
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/tag.mdwn7
-rw-r--r--doc/plugins/tag/discussion.mdwn1
-rw-r--r--doc/plugins/write.mdwn17
3 files changed, 25 insertions, 0 deletions
diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn
index 8ff70a069..8e1286e62 100644
--- a/doc/plugins/tag.mdwn
+++ b/doc/plugins/tag.mdwn
@@ -8,6 +8,13 @@ These directives allow tagging pages.
It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to
match pages that are tagged with a specific tag.
+The `tagbase` setting can be used to make tags default to being put in a
+particular subdirectory.
+
+The `tag_autocreate` setting can be used to control whether new tag pages
+are created as needed. It defaults to being done only if a `tagbase` is
+set.
+
[[!if test="enabled(tag)" then="""
This wiki has the tag plugin enabled, so you'll see a note below that this
page is tagged with the "tags" tag.
diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn
index 03dcb7b2f..dfd749252 100644
--- a/doc/plugins/tag/discussion.mdwn
+++ b/doc/plugins/tag/discussion.mdwn
@@ -28,3 +28,4 @@ See [[todo/auto-create tag pages according to a template]]
-- Jeremy Schultz <jeremy.schultz@uleth.ca>
+`tag_autocreate` can now enable this. --[[Joey]]
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 0bf6fcf48..404c3b44f 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -966,6 +966,23 @@ added. Pass it the page that contains the link, and the link text.
An optional third parameter sets the link type. If not specified,
it is an ordinary [[ikiwiki/WikiLink]].
+### `add_autofile($$$)`
+
+Sometimes you may want to add a file to the `srcdir` as a result of content
+of other pages. For example, [[plugins/tag]] pages can be automatically
+created as needed. This function can be used to do that.
+
+The three parameters are the filename to create (relative to the `srcdir`),
+the name of the plugin, and a callback function. The callback will be
+called if it is appropriate to automatically add the file, and should then
+take care of creating it, and doing anything else it needs to (such as
+checking it into revision control). Note that the callback may not always
+be called. For example, if an automatically added file is deleted by the
+user, ikiwiki will avoid re-adding it again.
+
+This function needs to be called during the scan hook, or earlier in the
+build process, in order to add the file early enough for it to be built.
+
## Miscellaneous
### Internal use pages