From 7ba4440f4b84ba5caa10c4786af105afc52ea513 Mon Sep 17 00:00:00 2001 From: Eduardo Pereira Date: Tue, 30 Apr 2024 16:12:44 -0300 Subject: [PATCH] Add Steps component to `rss.mdx` --- src/content/docs/en/guides/rss.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/docs/en/guides/rss.mdx b/src/content/docs/en/guides/rss.mdx index 385fe9fd51ce9..6f3bec6b1e2da 100644 --- a/src/content/docs/en/guides/rss.mdx +++ b/src/content/docs/en/guides/rss.mdx @@ -4,9 +4,9 @@ description: Add an RSS feed to your Astro site to let users subscribe to your c i18nReady: true type: recipe --- -import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' -import Since from '~/components/Since.astro' - +import Since from '~/components/Since.astro'; +import { Steps } from '@astrojs/starlight/components'; +import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'; Astro supports fast, automatic RSS feed generation for blogs and other content websites. RSS feeds provide an easy way for users to subscribe to your content. @@ -14,6 +14,7 @@ Astro supports fast, automatic RSS feed generation for blogs and other content w The package [`@astrojs/rss`](https://github.com/withastro/astro/tree/main/packages/astro-rss) provides helpers for generating RSS feeds using [API endpoints](/en/guides/endpoints/#static-file-endpoints). This unlocks both static builds _and_ on-demand generation when using an [SSR adapter](/en/guides/server-side-rendering/). + 1. Install `@astrojs/rss` using your preferred package manager: @@ -64,6 +65,7 @@ The package [`@astrojs/rss`](https://github.com/withastro/astro/tree/main/packag }); } ``` + ## Generating `items` @@ -82,7 +84,6 @@ The RSS feed standard format includes the following values for each published it To create an RSS feed of pages managed in [content collections](/en/guides/content-collections/), use the `getCollection()` function to retrieve the data required for your `items` array. You will need to specify the values for each desired property (e.g. `title`, `description`) from the returned data. - ```js title="src/pages/rss.xml.js" "items:" "const blog = await getCollection('blog');" import rss from '@astrojs/rss'; import { getCollection } from 'astro:content'; @@ -277,7 +278,6 @@ With this tag, readers of your blog can enter your site's base URL into their RS 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. - ## Resources - [RSS Feeds](https://aboutfeeds.com/)