Still not possible to make taxonomies in subdirectories?

Hello all, I’m getting started with Hugo, and I’m making a website with a /blog/ subdirectory and a “category” taxonomy. But, I want the category taxonomy to be accessible only within the /blog/ subdir, so that, say, /blog/category/announcements/ would be valid while /category/announcements/ would 404.

I can’t figure out how to do this myself, and the only forum post on the topic (which is from 2017) says it isn’t possible in that current version of Hugo. Is it still not possible to make a taxonomy page in a subdir in the latest versions?

I’m using Hugo version 0.100.2

In your config.yaml file you need to add:

  categories: blog/category/:slug/

or if your config file is in .toml:

  categories = 'blog/category/:slug/'
1 Like

Thank you!

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