Don't prepend tagbase to tags if they start with "./" or "/".
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Mon, 21 Jul 2008 21:01:11 +0000 (22:01 +0100)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Mon, 21 Jul 2008 21:02:55 +0000 (22:02 +0100)
That syntax made little sense previously, and this allows sites to put
"most" of their tags under $tagbase.

IkiWiki/Plugin/tag.pm
doc/plugins/tag.mdwn

index f0e3c223c5523a3c40cb47909099bfc2972e9b76..b0a0e53be7cec3c73147ce61fe353aaa9b8a3d69 100644 (file)
@@ -25,7 +25,8 @@ sub getopt () { #{{{
 sub tagpage ($) { #{{{
        my $tag=shift;
                        
 sub tagpage ($) { #{{{
        my $tag=shift;
                        
-       if (exists $config{tagbase} &&
+       if ($tag !~ m{^\.?/} &&
+           exists $config{tagbase} &&
            defined $config{tagbase}) {
                $tag=$config{tagbase}."/".$tag;
        }
            defined $config{tagbase}) {
                $tag=$config{tagbase}."/".$tag;
        }
index a2f0c7e5796e36b9819430d9202d1f7884282189..c197ae53f99e6fcda3697cd1fc2e477e62bfa0a4 100644 (file)
@@ -24,6 +24,12 @@ tags/tech, tags/life, and tags/linux. 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.
 
 having to write the full path to tags, if you want to keep them grouped
 together out of the way.
 
+If you want to override the tagbase for a particular tag, you can use
+something like this:
+
+       \[[!tag ./foo]]
+       \[[!taglink /foo]]
+
 [[!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.
 [[!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.