You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I'll try to work on it later on. Related to PR #342, I would also like to be able to finetune meta tags for each lesson. This would require being able to pass an image URL through the lesson metadata, and it would be great to be able to do that in user-land without having to extend the framework.
eric-burel
changed the title
Extending the content schema (for an RSS feed)
Extending the content schema (for an RSS feed, meta-tags etc.)
Sep 20, 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:
rss: true
field to lessons or parts I specifically want to be listed (to avoid generating a feed with everything)publishedAt
field to lessons to have a publication dateI 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?The text was updated successfully, but these errors were encountered: