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 other types than maps in .Site.Data #3890

Closed
FelicianoTech opened this issue Sep 18, 2017 · 2 comments
Closed

Allow other types than maps in .Site.Data #3890

FelicianoTech opened this issue Sep 18, 2017 · 2 comments
Assignees
Milestone

Comments

@FelicianoTech
Copy link
Contributor

The following example YAML file cannot currently be used with Hugo:

# ./data/books.yml
- title: "Harry Potter and the Order of the Phoenix"
  author: "J.K. Rowlings"
  pages: 870
- title: "A Wrinkle in Time"
  author: "Madeleine L'Engle"
  pages: 240
- title: "My Side of the Mountain"
  author: "Jean Craighead George"
  pages: 175

This is because the root node here would be a YAML sequence (a.k.a a list), which is valid YAML but Hugo doesn't currently support.

This Issue originated in Hugo Discussion.

@bep bep added this to the v0.28 milestone Sep 19, 2017
@bep bep self-assigned this Sep 19, 2017
@bep bep changed the title Support Unmarshalling YAML Data Files With List/Sequence Root Node Allow other types than maps in .Site.Data Sep 19, 2017
@bep bep modified the milestones: v0.28, v0.29, v0.30 Sep 21, 2017
@bep bep modified the milestones: v0.30, v0.31 Oct 13, 2017
@zealic
Copy link

zealic commented Oct 20, 2017

I has tested data file format support for array type:

  • JSON
  • YAML
  • TOML

@bep bep modified the milestones: v0.31, v0.32 Oct 30, 2017
@bep bep modified the milestones: v0.32, v0.33 Dec 16, 2017
@bep bep modified the milestones: v0.33, v0.34 Jan 11, 2018
@bep bep modified the milestones: v0.34, v0.35, v0.36 Jan 22, 2018
bep pushed a commit that referenced this issue Feb 2, 2018
*  Adds retro-coverage for #4361
*  Verifies open issues #4138, #3890, #4366, 4083
*  Removes test reliance on the very code it is testing (hugo/parser package).
   Expected results are now all built manually / are more precise.
   Tests can run against different versions (no linkage errs)
@bep bep modified the milestones: v0.36, v0.37 Feb 3, 2018
@bep bep modified the milestones: v0.37, v0.38 Feb 11, 2018
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

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 Mar 8, 2022
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

3 participants