Can Taxonomy Be Centralized Instead of Frontmatter?

Is there a way to store taxonomy terms centrally, instead of front matter? For example, rather than adding a category to the frontmatter of all the articles in the category, can the category _index.md or a data file list the pages in the category?

No.

However if you are in a situation when you need the children of a Section to inherit certain Taxonomy Terms from their first level parent you can achieve it by using Front Matter Cascade in the Section’s _index.md

I’m not sure how practical it is, but you can assign terms to pages via cascade in config (which I guess is outside of front matter).

But that doesn’t really allow you to out different taxonomy terms on, eg, different articles.

It does (you can match by Gob pattern etc.), but as I said, not very practical.

1 Like

I’m wondering why this is a problem for you.
Lots of old post to change? Unix CLI tools like Sed can be really useful.

We might be able to give better advice if we know what you’re end goal is.

For a series of articles, it is a lot easier to define them in a the frontmatter of the series, rather than the the frontmatter of each article. That’s an important use case too, because articles might appear in more than one series ,and might need to be ordered differently than their dates.

I see. I suppose an Archetype for a series of articles is overkill too.

On the whole I feel that what you’re looking for is a content management system. Have you thought about external tooling for managing your content, even if you stick with Hugo for site generation? There are a lot of headless CMSs around these days…

Well the fallback workaround is writing scripts to modify Hugo content. That works to some extent. The problem though is that custom scripting ends up reducing compatibility with things like Netlify CMS.

On the other hand, there are already a lot of warts with Netlify CMS-Hugo integration. Perhaps some good git actions to process Hugo content might be a way to solve that problem…