I have two Hugo sites setup almost the exact same way. I’m having an issue where my taxonomy rollup pages (the one that lists all pages tagged with the term) isn’t finding any related pages on one site, but the other site with the same code is working as expected. After lots of troubleshooting, I’m at a loss for what to look for to fix it… hoping someone has an idea for what to look at.
Broken page: andrewconnell.com/tags/azure
Working page: voitanos.io/tags/azure
Both have the same taxonomy configuration in config.yaml & folder structure for the content (/tags/[tag-name]
), and template (/themes/[..]/layouts/tags/list.html
). To debug the pages, I’ve put a single debug statement to show the pages it found on the list page ({{ partial "debugprint.html" .Pages }}
) and it confirms the broken page has 0 pages it found while the working site shows a collection returned.
But, when I jump up one level (remove “/azure/” form the URLs), you can see it is finding the number of pages in the term on the rollup page (/themes/[..]/layouts/tags/tag-list.html
). The code I use to show the counts is as follows (some omitted for brevity):
{{ range .Site.Taxonomies.tags }}
{{ /* ... */ }}
View all {{.Count}} posts
{{ end }}
Does anyone have suggestions on what I can look to? To compare differences, I’ve run the themes and config.yaml through a diff tool to ensure there’s not a special character present or I’ve overlooked something… so I’m at a loss and looking for help…