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

Possible to have a "list" in the root of a file collection? #1282

Closed
snirp opened this issue Apr 18, 2018 · 4 comments
Closed

Possible to have a "list" in the root of a file collection? #1282

snirp opened this issue Apr 18, 2018 · 4 comments

Comments

@snirp
Copy link

snirp commented Apr 18, 2018

Gatsby can make relationships between nodes through "mappings". You need to refer to a file - yaml or json - which contains a list in the root.

This would be an example of a file that can be consumed by the Gatsby mapping:

- id: Kyle Mathews
  twitter: "@kylemathews"
- id: Mathew Kyles
  twitter: "@mathewkyles"

I have not found a way to have a root-level list in Netlify CMS. Am I correct that a list can only exist under an object? How can we achieve these mappings then?

@tech4him1
Copy link
Contributor

tech4him1 commented Apr 18, 2018

I've just been needing the same thing myself, so I'd definitely accept this.

@erquhart
Copy link
Contributor

Same here, wondering if maybe a boolean on the collection should signify whether the base value is a list or object.

@davepwsmith
Copy link

I have been absolutely banging my head against a wall with this, so would appreciate a solution also! I'm by no means a pro at React/JS but happy to help where I can.

@tech4him1
Copy link
Contributor

Closed as a duplicate of #531.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants