summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins/tag.mdwn3
-rw-r--r--doc/plugins/write.mdwn17
-rw-r--r--doc/roadmap.mdwn1
3 files changed, 21 insertions, 0 deletions
diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn
index 8ff70a069..bdf39d7e8 100644
--- a/doc/plugins/tag.mdwn
+++ b/doc/plugins/tag.mdwn
@@ -8,6 +8,9 @@ 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.
+If the `tag_autocreate` setting is enabled, tag pages will automatically be
+created as needed.
+
[[!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/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
diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn
index 0c7bf2fa8..8e2a01827 100644
--- a/doc/roadmap.mdwn
+++ b/doc/roadmap.mdwn
@@ -78,6 +78,7 @@ Probably incomplete list:
* Make pagespecs match relative by default? (see [[discussion]])
* Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]])
* YADA format setup files per default?
+* Enable `tag_autocreate` by default.
In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
upgrade to deal with changes that break compatability. Some things that