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

Content loaders #471

Open
lilnasy opened this issue Jan 22, 2025 · 1 comment
Open

Content loaders #471

lilnasy opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lilnasy
Copy link

lilnasy commented Jan 22, 2025

Astro's content layer provides an abstraction for loading data from social media, alternative data formats, headless CMS. It is not limited to disk anymore.

Do you think something similar is within scope of this project? If so, would you consider community contribution/collaboration towards the feature?

@sdorra sdorra self-assigned this Jan 22, 2025
@sdorra sdorra added the enhancement New feature or request label Jan 22, 2025
@sdorra
Copy link
Owner

sdorra commented Jan 22, 2025

Yes, I've already thought about it. My plan is to create a "source" abstraction that returns the documents of a collection along with a watcher. The implementation of the source could be file system-based or something different.

I would like to export another function from core that allows the creation of such a source, called defineSource. The result could then be passed to the collection. This could be used to create packages for specific sources, such as headless CMS or remote Git repositories (#372).

I would love to see community contributions for this, but it is a non-trivial change. Getting the types correct could be quite challenging and likely involves a breaking change for the configuration.

I don't have much time to implement it myself right now, but I'm here to support you in any way I can if you're willing.

@sdorra sdorra marked this as a duplicate of #372 Jan 22, 2025
@sdorra sdorra mentioned this issue Jan 22, 2025
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