Content Front Matter - Keywords vs taxonomy

In the documentation for Front Matter, there is a section called “keywords”, and at the bottom of the document, there is a section for “taxonomies”

keywords
The meta keywords for the content.

Taxonomies
Field name of the plural form of the index. See tags and categories in the above front matter examples. Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.

Now, I fully understand taxonomies… My question is where do keywords come into play? Are they rendered in some part of the default template, or are they just a primitive form of tags/taxonomy?

(edited to remove angle-brackets around taxonomies word, which caused it to disappear…)

Keywords, tags and categories are taxonomies!

By default, tags and categories are rendered in pages. Keywords are not.

So the default config is:

[taxonomies]
category =  "categories"
tag = "tags"

But you can render keywords, too.

[taxonomies]
category =  "categories"
keyword = "keywords"
tag = "tags"

Or disable categories (and keep tags):

[taxonomies]
tag = "tags"

Note: There isn’t a “default template” with Hugo.

Again, I understand the taxonomies config grouping… but in the Front Matter documentation above, in the “Predefined” there is a keyword entry, separate and distinct from the taxonomies section.

What is its intended purpose? Just an internal keywording mechanism that does not trigger page creation like in the taxonomies section?

Indeed, this does not trigger the creation of pages.

I think it is defined in the meta of the pages because it is a standard markup, like description, for example.

https://html.spec.whatwg.org/#meta-keywords

Interesting, so then if I wanted to populate that header meta/keyword tag, I would adjust my “base_of.html” or appropriate template to make use of it… or in my case just populate the page header with my taxonomy’s “tag”, which is what I use it for anyway…

Gotcha.

1 Like

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