-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Unmarshaling of front matter produces incorrect data types for some slices #10624
Comments
As I read the code, this happens with non-string slice types (e.g. ints in the example above). This has probably been the case since Hugo 0.10 or something ... I have no clue why this behaves the way it does; I will create a PR and see if some tests blow up. |
@bep Regarding the original context of that thread, please also ensure that mixed types (like strings and maps, regardless of the type of the first element) in a list result in a []any type. 🙏 |
@willfaught have a look at the 3 test cases here: https://github.com/gohugoio/hugo/pull/10625/files#diff-9536370a7750aee5a746670c7adefeb0d62de88a150bb8fea9a7d3597f2219cfR43-R45 |
@willfaught yea, the new logic is that if |
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. |
This is not a new issue. It has been present since v0.54.0 (and perhaps earlier).
Front matter:
Template:
The front matter format (JSON, TOML, or YAML) is irrelevant.
The
transform.Unmarshal
template produces the expected results:Reference:
https://discourse.gohugo.io/t/42141/2
The text was updated successfully, but these errors were encountered: