Description
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?