-
-
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
Cascade with _target discriminator only works for TOML frontmatter #7874
Comments
gwatts
added a commit
to gwatts/hugo
that referenced
this issue
Oct 22, 2020
TOML unmarshals slices of string maps to []map[string]interface{} whereas YAML and JSON decode to []interface{} The existing tests only check for TOML working correctly, and _target did not work at all for frontmatter defined in other formats. Add a function to normalize those slices Fixes gohugoio#7874
gwatts
added a commit
to gwatts/hugo
that referenced
this issue
Oct 22, 2020
The TOML lib unmarshals slices of string maps to []map[string]interface{} whereas YAML and JSON decode to []interface{} The existing tests only check for TOML working correctly, and _target with cascade did not work at all for frontmatter defined in other formats. Add a function to normalize those slices Fixes gohugoio#7874
bep
pushed a commit
that referenced
this issue
Oct 22, 2020
The TOML lib unmarshals slices of string maps to []map[string]interface{} whereas YAML and JSON decode to []interface{} The existing tests only check for TOML working correctly, and _target with cascade did not work at all for frontmatter defined in other formats. Add a function to normalize those slices Fixes #7874
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.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes (and with
master
)Defining a cascade with the new
_target
discriminator (#7782) using TOML for the frontmatter works as expected, using other formats such as YAML causes the cascade to be ignored completelyThis appears to be due to the way that the TOML library unmarshals slices. I have a fix working locally; will open a PR shortly
The text was updated successfully, but these errors were encountered: