Different taxonomies for different parts of the website?

Hello, I have two sections for my website: ‘knowledge base’ and ‘blog’

I want to create the taxonomy ‘categories’ for both of them. The values for those categories will be different, what is the best way to set this up? Ideally I would like the taxonomies of each to not be aware of the other.

There are several different ways to handle this, but I’d lean towards using the same “categories” taxonomy for both sections.

Untested, but you should be able to customize a taxonomy template to only show the categories of content in the current section, but that would still leave the possibility to show all categories across the whole site if you ever wanted it.

The other option is just to create two separate taxonomies, but remember that the default taxonomy templates include the taxonomy name in the URLs (e.g. example.com/blog/categories/), so you’d want something still relevant:

Taxonomy templates are not in a section, how does that work? If I go to example.com/categories/featured, which section is it in?

Hugo taxonomies don’t work like that. You should create different taxonomies for each section if you don’t want them to be shared between your content sections. I recommend using a single taxonomy, because that’s useful for humans visiting websites. :slight_smile:

Not elegant, but ranging over the pages matching any taxonomy and then checking the section of those pages I believe would work, but did warn it was untested.

What’s the relationship between taxonomies and content sections in terms of navigation?

For example; I was watching the YouTube video in the Hugo docs and at one point; the article is able to be found using it’s taxonomy /<taxonomy_name>/<article_name>

But based on the Hugo docs, this is also how it works with sections.

Where can I find clarity on this?

I suggest building a site with Hugo and seeing how it works.

I did and it did not work this way; despite what it said in the video