-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Page.GetTerms order is inconsistent and overrides term order in front matter #7213
Comments
gcushen
added a commit
to HugoBlox/hugo-blox-builder
that referenced
this issue
Apr 30, 2020
Hugo bug causes authors not to be listed in the order in which they were defined in the front matter. See Hugo bug report at gohugoio/hugo#7213 This commit partially reverts f78feef where the code was refactored to use Page.GetTerms for authors.
This breaks the author order for publications on my website in a way which could be misconstrued as disingenuous. Would be great to get the old behavior back. |
I will try to fix this, but note that the order isn't "inconsistent" or random or anything |
bep
added a commit
to bep/hugo
that referenced
this issue
Jun 15, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes gohugoio#7213
Merged
bep
added a commit
to bep/hugo
that referenced
this issue
Jun 15, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes gohugoio#7213
bep
added a commit
to bep/hugo
that referenced
this issue
Jun 15, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes gohugoio#7213
bep
added a commit
that referenced
this issue
Jun 15, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes #7213
muenchhausen
pushed a commit
to muenchhausen/hugo
that referenced
this issue
Jun 24, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes gohugoio#7213
muenchhausen
pushed a commit
to muenchhausen/hugo
that referenced
this issue
Jun 24, 2020
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms). Fixes gohugoio#7213
YoungWilliamZ
pushed a commit
to YoungWilliamZ/hugo-academic
that referenced
this issue
Jul 29, 2020
Hugo bug causes authors not to be listed in the order in which they were defined in the front matter. See Hugo bug report at gohugoio/hugo#7213 This commit partially reverts f78feef where the code was refactored to use Page.GetTerms for authors.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The implementation in #6905 differs in behaviour to the previous approach and ignores the order that the user defined the terms.
This causes issues in sites where the order of terms is important, such as when displaying page authors from an author taxonomy.
See the reports at
The goal in #6905 was to be able to rewrite
as something like:
However, the order of
GetTerms
differs to the earlier approach and ignores the order that the user defined the terms.The order is very important to users when using taxonomies for things such as authors. For example, users expect if they define someone as the main author of a page, Hugo respects the order and lists that author first.
It appears that
GetTerms
ignores the order of terms defined in a pages front matter and there is no way for user to workaround this without fixing the order in Hugo itself to respect the order defined in the front matter and be consistent with the earlier approach.What version of Hugo are you using (
hugo version
)?Hugo Static Site Generator v0.69.2/extended darwin/amd64
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: