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

Support singleton items #300

Open
rosszurowski opened this issue Sep 10, 2024 · 0 comments
Open

Support singleton items #300

rosszurowski opened this issue Sep 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@rosszurowski
Copy link

I recently migrated from contentlayer to content-collections. (Side note: thanks for your work building this, it's much simpler and easier to use!) One thing that contentlayer supports is singleton collections, that only represent a single document. This is really useful for global config like structured documentation navigation data, a global authors list, or other global config.

It's easy to work around right now by just taking the first item in a collection and throwing an error if not set, but it'd be nice if content-collections could verify this for me at compile time instead.

@sdorra sdorra added the enhancement New feature or request label Sep 12, 2024
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