Nested taxonomies

E.g. I have “categories” and “tags” in my taxonomies. Is it possible to range all tags that belong to a certain category?
Should both be in taxonomies? Or if I have only “categories” in taxonomies, can I within a certain category range all documents that share a common tag?

You have tags within a category, and category is a taxonomy?

How will you define the connection between tags and categories ?

Say you have a category of eductional streams like science, politics, language and tags as subjects like physics, biology, chemistry, international-relations, hindi.

You know that subjects like physics , chemistry and biology tags are related to science category of eductional stream, but how do you propose to make this connection in the frontmatter ?

PS: I suppose you can mark the tags and categories with a prefix like 0_science , 0_physics and so on. That can tell the code that they are related. You can then do string manipulation to match tags and categories that have this prefix.

Say, my info.md files have a few categories - VEHICLES etc. Is it possible to range all documents of this category?

https://gohugo.io/functions/collections/where/#intersection-comparison

Thank you Joe! It works!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.