I’m tagging my pages in the front matter with things such as
tags: [ 'foo', 'bar' ]
To provide some documentation for my tags, I have pages:
content/tags/_index.md (an overview)
content/tags/foo/_index.md
content/tags/bar/_index.md
(This is correct, right? content/tags/foo/_index.md rather than content/tags/foo.md?)
Now I’d like to apply a different layout for content/tags/_index.md and for content/tags/foo/_index.md. I’m reading https://gohugo.io/templates/lookup-order/ which I interpret to mean that I could define:
layouts/categories/tags.html.html for content/tags/_index.md, and
layouts/categories/tag.html for content/tags/foo/_index.md
layouts/tags/tag.html for content/tags/_index.md (Taxonomy)
layouts/tags/term.html for content/tags/foo/_index.md (Term) Applied to All term under tags taxonomy
(Not Tested)
If you want to apply specific template for content/tags/foo/_index.md (the termfoo under tags taxonomy only), you may try to set the layout manually on content frontmatter.
the look up will be layouts/tags/<custom_layout_name>.html