starlight-blog icon indicating copy to clipboard operation
starlight-blog copied to clipboard

Possibility to use the `excerpt` content for RSS content

Open julien-deramond opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?

Sort of!

Most of the time, my blog posts include and render Astro components, so the rendering within the RSS feed is not that readable as is:

Screenshot 2024-07-03 at 20 13 51

We can see there for instance a import ProjectThumbnail from '../../../components/ProjectThumbnail.astro' at the beginning of the feed.

Describe the solution you'd like

It's probably not a common use case for starlight-blog, but I think being able to use another content via the interface could be useful.

I'm thinking about giving the possibility to use the excerpt for instance in the plugin configuration by adding a new parameter. Maybe something like:

starlightBlog({
  rss: {
    excerptAsContent: true // false by default
  }
})

It would be transparent for the majority of users. And folks having complex content to render could use the excerpt to have a text without "embellishments".

Note: If not having the entire blog post in the feed is not a good practice (I'm not used to use them a lot), feel free to close this issue.

Describe alternatives you've considered

I'm not sure if it'd be possible, but another alternative would be to override what's done by default by starlight-blog to create my own RSS "rendering".

Additional Context

No response

julien-deramond avatar Jul 03 '24 18:07 julien-deramond

Thanks for the feedback 🙌

The long term solution to this issue would be the Astro Container API which landed as an experimental feature in Astro 4.9.0.

The API is still in its very early stage but I think waiting for a more stable version (not even out of experimental) is the approach I'm leaning towards. I'm actively following the development of this feature and will revisit depending on the progress.

HiDeoo avatar Jul 04 '24 07:07 HiDeoo