},
tag_autocreate => {
type => "boolean",
- example => 0,
+ example => 1,
description => "autocreate new tag pages?",
safe => 1,
rebuild => undef,
sub gentag ($) {
my $tag=shift;
- if ($config{tag_autocreate}) {
+ if ($config{tag_autocreate} ||
+ ($config{tagbase} && ! defined $config{tag_autocreate})) {
my $tagpage=taglink($tag);
if ($tagpage=~/^\.\/(.*)/) {
$tagpage=$1;
not regular wikilinks. If your wiki accidentially relied on the old,
buggy behavior, you might need to change pagespecs to use `link()`.
+ Tag pages can automatically be created as new tags are used. This
+ feature is enabled by default if you have configured a tagbase. It
+ can be turned on or off using the `tag_autocreate` setting.
+
The title_natural sort method (as used by the inline directive, etc)
have been moved to the new sortnaturally plugin, which is not enabled
by default since it requires the Sort::Naturally perl module.
Note that if the wiki is configured to use a tagbase, then the tags will be
located under a base directory, such as "tags/". This is a useful way to
avoid having to write the full path to tags, if you want to keep them
-grouped together out of the way.
+grouped together out of the way. Also, since ikiwiki then knows where to put
+tags, it will automatically create tag pages when new tags are used.
Bear in mind that specifying a tagbase means you will need to incorporate it
into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is
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.
+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