From 30b3d54c18c5741f0bc7df34bed1f231374b231b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 12 Apr 2010 23:56:26 +0200 Subject: [PATCH] tagtype also acts as tagbase Document this, and add a TODO about customization --- IkiWiki/Plugin/tag.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 1176226b4..73cc9d752 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -35,10 +35,11 @@ sub getsetup () { safe => 1, rebuild => 1, }, + # TODO make this a hash so that we can have the user specify the linktype, tagbase and template param for each custom tag type tagtypes => { type => "string", example => ["category", "column"], - description => "extra categorization types: they define a new directive each, with a corresponding template parameter and link type", + description => "extra categorization types: they define a new directive each, with a corresponding template parameter, link type and tag base", safe => 1, rebuild => 1, } @@ -65,8 +66,7 @@ sub tagpage ($$) { if (defined $type && $type ne "tag") { $tag="/$type/$tag"; - } - if ($tag !~ m{^\.?/} && + } elsif ($tag !~ m{^\.?/} && defined $config{tagbase}) { $tag="/".$config{tagbase}."/".$tag; $tag=~y#/#/#s; # squash dups -- 2.32.0.93.g670b81a890