Skip to content

Support top-level array in JSON files #3324

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

Open
jeannen opened this issue Apr 23, 2025 · 1 comment
Open

Support top-level array in JSON files #3324

jeannen opened this issue Apr 23, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@jeannen
Copy link

jeannen commented Apr 23, 2025

Is your feature request related to a problem? Please describe

When working on SEO, there are many instances where creating a single JSON array file is MUCh more convenient than having hundreds of small files, especially when working with AI.
If I want to change something to all my content, I would either have to manually change files one by one, or ask Cursor to go through every file and edit it, which is much more expensive AND complex than editing a single file

Describe the solution you'd like

Simply being able to have one single JSON file for all my documents.

Describe alternatives you've considered

I tried creating a collection with a sub-property array, but it does not support large arrays, after 96 or so I get an error (does not seems related to the length but more the size of the file. I made some tests and it seems like 59kb is the size after which it crashes, with syntax error near "collectionName", no matter what the syntax is)

Additional context

@jeannen jeannen added the enhancement New feature or request label Apr 23, 2025
@farnabaz
Copy link
Member

Have you tried creating a custom source for your collection? https://content.nuxt.com/docs/advanced/custom-source
Your goal is very similar to the custom source example in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants