Skip to content

Commit

Permalink
Add section about RSS autodiscovery to RSS guide (withastro#7108)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Yan <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2024
1 parent 958c8bd commit c1960f9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/content/docs/en/guides/rss.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,23 @@ rss({
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.
:::

## Enabling RSS feed auto-discovery

[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.

To enable, add a `<link>` tag with the following attributes to your site's `head` element:

```html
<link
rel="alternate"
type="application/rss+xml"
title="Your Site's Title"
href={`${Astro.site}rss.xml`}
/>
```

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.

## Next Steps

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.
Expand Down

0 comments on commit c1960f9

Please sign in to comment.