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

Extending the content schema (for an RSS feed) #327

Open
eric-burel opened this issue Sep 11, 2024 · 1 comment
Open

Extending the content schema (for an RSS feed) #327

eric-burel opened this issue Sep 11, 2024 · 1 comment
Labels
enhancement New feature or request pr-welcome Accepting pull requests for this change

Comments

@eric-burel
Copy link

eric-burel commented Sep 11, 2024

Is your feature request related to a problem?

Hi,
Since I am "building in public" and crafting lessons as I go, I'd like to setup an RSS feed for some lessons.

In order to feed it, I would need to alter lessons metadata:

  • to add an rss: true field to lessons or parts I specifically want to be listed (to avoid generating a feed with everything)
  • to add a publishedAt field to lessons to have a publication date
  • ideally, add other RSS friendly fields

I would also need a way to get the lesson URL.

Describe the solution you'd like.

I'd like to either have an RSS feed out-of-the-box or be able to craft one in userland.

Describe alternatives you've considered.

Since RSS is a specific but common problematic, it could make sense to add the relevant to add the field I've listed into the contentSchema, to make it easy to implement a feed.

I would also need an helper to get a lessons link, which is the reverse operation from what generateStaticRoutes does to compute valid slugs. Perhaps we could precompute links when we build the "tutorial" collections?

The other alternative is to allow passing a custom schema, so the frontmatter of lessons can be extended freely provided it keeps the tutorial kit mandatory fields around. I would still need a helper to get the lesson URL.

Additional context

I don't seem to have a typed result when I run getCollection("tutorial"), perhaps Astro system that types collections cannot cross packages?

@AriPerkkio
Copy link
Member

RSS feed support is not something we are prioritizing right now. But we will accept a pull request for this, if proposed changes are not too complex.

@AriPerkkio AriPerkkio added enhancement New feature or request pr-welcome Accepting pull requests for this change labels Sep 16, 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 pr-welcome Accepting pull requests for this change
Projects
None yet
Development

No branches or pull requests

2 participants