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

docs: add rss guide #43

Merged
merged 3 commits into from
May 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,25 @@ date: 2023-07-24

Hello world!
```

## Configure your RSS feed

Set the Astro [`site`](https://docs.astro.build/en/reference/configuration-reference/#site) configuration option and add [Starlight's `social`](https://starlight.astro.build/guides/customization/#social-links) RSS configuration option using your website's full URL. Your RSS feed will be located at `/blog/rss.xml`

```js title="astro.config.mjs"

import { defineConfig } from 'astro/config'

export default defineConfig({
site: 'https://www.example.com'
starlight({
social: {
rss: 'https://www.example.com/blog/rss.xml',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I don't know whether this URL needs to be absolute or not!

},
}),
})
```

This will create a `.xml` file for feed readers and add the standard RSS icon to your website's header.

Learn more about RSS feeds in Astro, including how to [enable RSS feed auto-discovery](https://docs.astro.build/en/guides/rss/#enabling-rss-feed-auto-discovery) in the official Astro documentation.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to link back to Astro here because this page also has more generic RSS info at external links.