Skip to content

Commit c1960f9

Browse files
tylermercersarah11918yanthomasdev
authored
Add section about RSS autodiscovery to RSS guide (#7108)
* Add section about RSS autodiscovery to RSS guide Inspired by [this article](https://rknight.me/blog/please-expose-your-rss/). I figured it would be good to steer Astro users in that direction via the guide. * sarah's edits --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent 958c8bd commit c1960f9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/content/docs/en/guides/rss.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,23 @@ rss({
230230
If you'd prefer not to create your own stylesheet, you may use a premade stylesheet such as the [Pretty Feed v3 default stylesheet](https://github.com/genmon/aboutfeeds/blob/main/tools/pretty-feed-v3.xsl). Download the stylesheet from GitHub and save into your project's `public/` directory.
231231
:::
232232

233+
## Enabling RSS feed auto-discovery
234+
235+
[RSS autodiscovery](https://www.rssboard.org/rss-autodiscovery) allows browsers and other software to automatically find a site's RSS feed from the main URL.
236+
237+
To enable, add a `<link>` tag with the following attributes to your site's `head` element:
238+
239+
```html
240+
<link
241+
rel="alternate"
242+
type="application/rss+xml"
243+
title="Your Site's Title"
244+
href={`${Astro.site}rss.xml`}
245+
/>
246+
```
247+
248+
With this tag, readers of your blog can enter your site's base URL into their RSS reader to subscribe to your posts without needing the specific URL of your RSS feed.
249+
233250
## Next Steps
234251

235252
After visiting your feed in the browser at `your-domain.com/rss.xml` and confirming that you can see data for each of your posts, you can now [promote your feed on your website](https://medium.com/samsung-internet-dev/add-rss-feeds-to-your-website-to-keep-your-core-readers-engaged-3179dca9c91e#:~:text=com/~deno%2Drss-,Advertising%20your%20RSS%20feed,-Now%20you%20have). Adding the standard RSS icon to your site lets your readers know that they can subscribe to your posts in their own feed reader.

0 commit comments

Comments
 (0)