Closed willfaught closed 1 month ago
With an empty site and Hugo's default configuration:
{{ site.Taxonomies | warnf "%#[1]v (%[1]T)" }}
The console emits:
WARN page.TaxonomyList{"categories":page.Taxonomy{}, "tags":page.Taxonomy{}} (page.TaxonomyList)
So the data type is correct.
I don't know what I was smoking, printing site.Taxonomies.authors elements instead of site.Taxonomies. Sorry about that.
https://gohugo.io/methods/site/taxonomies/ is confusing. It says it returns a page.TaxonomyList, but if you print the type, it prints page.WeightedPages. This confused me, because then it wasn't clear how to get a page.TaxonomyList. After some fumbling around, I tried using
.Page
on the page.WeightedPages value, and it worked, so apparently page.WeightedPages is equivalent to page.TaxonomyList somehow?Input:
Output:
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes