Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to render weighted pages by term when taxonomy has space in name #12001

Closed
jmooring opened this issue Feb 6, 2024 · 3 comments
Closed
Assignees
Milestone

Comments

@jmooring
Copy link
Member

jmooring commented Feb 6, 2024

config

[taxonomies]
"book author" = "book authors"

content

content/books/good-omens.md

---
title: Good Omens
book authors:
  - Neil Gaiman
  - Terry Pratchett
---

... and two others

template

{{- $taxonomy := "book authors" }}
{{- range $term, $weightedPages := index site.Taxonomies "book authors" }}
  {{- $term }}|
  {{- range $weightedPages }}
    {{- .Title }}|
  {{- end }}
{{- end }}

results

v0.122.0

neil-gaiman|Coraline|Good Omens|terry-pratchett|Dodger|Good Omens|

v0.123.0-DEV-a80c3021 --> nothing rendered

example

git clone --single-branch -b hugo-github-issue-12001 https://github.com/jmooring/hugo-testing hugo-github-issue-12001
cd hugo-github-issue-12001
hugo && cat public/index.html 
@bep bep removed the NeedsTriage label Feb 6, 2024
@bep bep self-assigned this Feb 6, 2024
@bep bep added this to the v0.123.0 milestone Feb 6, 2024
@jmooring
Copy link
Member Author

jmooring commented Feb 6, 2024

I found this in an old test case, but a quick search found this:
https://discourse.gohugo.io/t/multi-word-taxonomies-how-to-use-in-partial/27522

I know it's uncommon.

@bep
Copy link
Member

bep commented Feb 6, 2024

No worries, when looking at it, the bug was obvious and fix simple.

bep added a commit to bep/hugo that referenced this issue Feb 6, 2024
@bep bep closed this as completed in 146aedd Feb 6, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants