RSS
Ce contenu n’est pas encore disponible dans votre langue.
Starlight Blog automatically generates an RSS feed for your blog when the Astro site option is set.
When defined, the following changes are made:
- An RSS feed is generated at
/blog/rss.xml(can be customized with theprefixoption) - A sidebar link to the RSS feed is added to the blog
- A social link to the RSS feed is added to the Starlight header
- RSS feed auto-discovery is automatically configured
Configure your RSS feed
Section titled “Configure your RSS feed”Set the Astro site configuration option in the astro.config.mjs file.
import starlight from '@astrojs/starlight'import { defineConfig } from 'astro/config'import starlightBlog from 'starlight-blog'
export default defineConfig({ site: 'https://www.example.com' starlight({ social: { plugins: [starlightBlog()], title: 'My Docs', }, }),})This will create a .xml file for feed readers, add a sidebar link to the RSS feed, add the standard RSS icon to your website’s header and configure RSS feed auto-discovery.