Tags not matched up

I have a page for my taxonomy that is not matched up with the tag.This causes hugo to think there are two tags when there is only one. This is happening when my tag has a “&” in it.

I get the same outcome with or without preserveTaxonomyNames: true.

To see the issue live you can view the test environemnt for this branch https://yellow-pond-042d21b03-488.westeurope.5.azurestaticapps.net/resources/tags

Setup

site\content\tags\objective-key-results_index.md

---
title: Objective & Key Results
---

its then used in a page:

site/content/resources/blog/2025/2025-08-18-getting-strted-with-okr/index.md

---
title: Getting Started with Objectives & Key Results
tags:
  - Objective & Key Results
---

Expected result

Hugo matches these up as objective-key-results and shows only the taxonomy page with the blog as a child.

Actual Result

Reproduce

  1. git clone https://github.com/nkdAgility/NKDAgility.com.git
  2. git checkout Add-OKR
  3. cd NKDAgility.com
  4. hugo server --source site --config hugo.yaml,hugo.local.yaml --cleanDestinationDir
  5. Open http://localhost:1313/resources/tags/ and search for Objective & Key Results

Questions:

  • Is it supposed to work with quotes in the title?

preserveTaxonomyNames isn’t a thing. It was removed years ago in v0.55.0.

This might be helpful:
https://discourse.gohugo.io/t/limit-use-of-punctuation-within-taxonomy-terms/48638

It was usefull:

  • \resources\objective-key-results\index.html (2)
  • \resources\objective-key-results\rss.xml (2)
  • resources\objective-key-results\page\1\index.html (2)

I still get this from the “Objective & Key Results”.

So… your post did not mention “&” as denies and also did not say it was allowed. Seams to have slipped through the cracks.

Is it correct that a “&” will not be matched up and I just cant have it in a taxonomy name?

I don’t remember the analysis on this (you can check the test repository), but I did not list the ampersand character here:

https://discourse.gohugo.io/t/limit-use-of-punctuation-within-taxonomy-terms/48638#naming-rules-2

Correct.

  • Ampersand is not listed on the allowed list
  • Ampersand is not listed on the denied list

I therefor do not know if its allowed or denied.

I’m missing something. That tips and tricks article doesn’t have a denied list; only an allow list.

Ahh I see. I was thingking of:

There are 9 characters that are disallowed by Windows: < > : " / \ | > *

I ran your validator… why would these be invalid?

ERROR The term "resourcetypes/case-studies" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/engineering-notes" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/guides" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/method" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/newsletters" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/principals" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/recipes" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/signals" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/videos" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".
ERROR The term "resourcetypes/workshops" in taxonomy "resourceTypes" is invalid. Taxonomy terms may contain Unicode letters, Unicode numbers, spaces, and any of the following characters: "_", "-", "#", "+", ".", "@", and "~".

well it looks like this might be the culprot:

resourceTypes: recipes

Hugo is reading it as resourceTypes/recipes as the taxonomy name. Odd… but ok…

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