Taxonomy Additional Information in Data

This is another question that is probably simple, but I have been tearing my head about…

One of the problems I see in Hugo is the fact that it is difficult to extend taxonomies with using the current taxonomy label as a slug and then defining a long name to the taxonomy (i.e., netblog is my current category label, but I’d like to render it as Network Blog). I know that the way to do this is to set up a TOML file in the /data/category directory, but I’ve been clueless trying to get the syntax right to import this data into my list.html template.

I’ve tried:
{{index .Site.Data.category .Title .category}} (since this is a list page, .Title should be the category name)

{{with index .Site.Data.category .Title}}{{.longname}}{{end}}

I get an empty return from this…

Any other suggestions?

The new way since Hugo 0.18 is to put a content file named “_index.md” in

/content/categories/my-category/_index.md

And put the metadata (title, params, content etc.) in there.

That worked, but I think I may have hit a bug…

I have a few taxonomies that have an _index.md file specified under /content/categories/ and /content/tags/. However, it seems I must now provide a _index.md for every category and tag or it won’t build the category or tag pages… Do I need to supply a _index.md in _default perchance?

For example, my very beta site code is at https://gitlab.com/jeffreycentex/jeffreycentex.gitlab.io/tree/master . Since I supply a category _index.md for all categories, they all get rendered. However, only the two tags that I specified generate tag pages (for instance, see https://jeffreycentex.gitlab.io/tags/drum-corp-international/ as an example of a tag not rendered, but https://jeffreycentex.gitlab.io/tags/comal-community-band/ is rendered).

That sounds like a bug … but I’m little surprised no-one has shouted about it … Could you create an issue at GitHub?

Just wanted to make sure that I wasn’t missing something fundamental like a _default block somewhere before I did that…

For people who find this topic through the search, the Github issue is here: