Hi,
I have mine setup like this:
[taxonomies]
channel = "channels"
category = "categories"
tag = "tags"
[permalinks]
categories = "/cat/:slug/"
tags = "/tag/:slug/"
channels = "/channels/:slug/"
My folder hierarchy:
/blog/{lang}/tags/{term}/_index.md
/blog/{lang}/categories/{term}/_index.md
/blog/{lang}/channels/{term}/_index.md
Then in the _index.md
file:
+++
title = "Public Domain"
aliases = ["/tag/public-domain"]
url = "tag/publicdomain"
translationKey = "tag-public-domain"
+++
+++
title = "공개 도메인"
aliases = ["/ko/tag/public-domain", "/ko/tag/publicdomain"]
#url = "tag/publicdomain"
translationKey = "tag-public-domain"
+++
So I think you need to check your folder structure and add an _index.md
file, something like: /blog/tacgia/{term}/_index.md
. Using your example, it would be: /blog/tacgia/cookiemonster/_index.md
.
Then in your _index.md
file:
+++
title = "The Cookie Monster"
#aliases = [""]
url = "tac-gia/the-cookie-monster"
#translationKey = ""
+++
If I may, you can keep the “plural” intact to make things unified in your config, like so:
[taxonomies]
author = 'authors'
[permalinks]
authors = '/tac-gia/:slug/'
If you do the above, then your folder structure should be: /blog/authors/{term}/_index.md
.
Lastly, but not the least, do not use hyphens, spaces, underscores, in your taxonomy folders. Condense it into one word and just add an _index.md
file per term to manipulate the URL of your terms.
Then in your frontmatter of your post/article, you reference it as that onewordterm
. For example:
+++
authors = ["cookiemonster"]
+++
See if it works.
P.s. I’m not sure if it’s hackish but it works for what I need: displaying terms in different languages and changing the taxonomy URL (instead of categories
, it’s simply /cat/
by declaring url
param in _index.md
file for each term). The only catch, I have to add an _index.md
file to each term.
I hope it helps.