I am trying to define a custom taxonomy “topics” and for each term within the taxonomy (each “topic”) define an image to use to render the link to that topic page. The structure I have created to define this custom metadata is as follows, in accordance to this documentation: Taxonomies | Hugo
/content/topics/topic_1/_index.md
/content/topics/topic_2/_index.md
I have defined this taxonomy in my hugo.toml:
[taxonomies]
category = 'categories'
tag = 'tags'
topic = 'topics'
And added topics to some of my posts’ front matter as follows:
+++
title = 'Test Post 1'
type = 'post'
tags = ['featured']
categories = ['category_1']
topics = ['topic_1', 'topic_2']
+++
However, when I attempt to use the metadata I defined, it seems like the actual topics defined in my posts are overwriting or somehow conflicting with the topics with actual metadata, as when I output the list of taxonomies for my site, the actual topics taxonomy is empty and the topics are listed under an empty key in the taxonomy map (instead of under the “topics” key)
{{range $key,$val := .Site.Taxonomies}} <br/>{{$key}} = {{$val}} {{end}}
Output:
= map[topic_1:[WeightedPage(0,"Test Post 1")] topic_2:[WeightedPage(0,"Test Post 1")]]
categories = map[category_1:[WeightedPage(0,"Test Post 1")]]
tags = map[featured:[WeightedPage(0,"Test Post 1")]]
topics = map[]
I am unsure where I went wrong in defining my custom term metatada, if someone could indicate the appropriate structure for defining such metadata it would be very much appreciated, thanks.