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

Allow cascade _target to work with non toml frontmatter #7875

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

gwatts
Copy link
Contributor

@gwatts gwatts commented 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

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
@gwatts gwatts changed the title Allow _cascade _target to work with non toml fm Allow cascade _target to work with non toml frontmatter Oct 22, 2020
@bep
Copy link
Member

bep commented Oct 22, 2020

Thanks for this, much appreciated. I should have remembered this by now.

@bep bep merged commit 3400aff into gohugoio:master Oct 22, 2020
@github-actions
Copy link

This pull request 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 Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cascade with _target discriminator only works for TOML frontmatter
2 participants