RSS
Overview
The RSS module generates RSS 2.0 feeds from Nuxt Content collections. Feeds are configured declaratively in nuxt.config.ts — each entry becomes a route at /rss/:name.
Configuration
rss: {
enabled: true, // default: true — set false to disable
feeds: {
decisions: {
collection: 'changelog',
title: 'My Site Changelog',
description: 'Latest updates',
basePath: '/changelog',
},
},
cacheTtl: 3600, // Cache-Control max-age in seconds
route: '/rss-feeds', // Feeds listing page path
}
This creates GET /rss/decisions returning RSS 2.0 XML. The feed is automatically prerendered at build time.
Feed Configuration
Each key in rss.feeds defines a feed:
rss: {
feeds: {
blog: {
collection: 'posts', // Nuxt Content collection (required)
title: 'Blog Feed', // Feed title
description: 'Latest posts',
basePath: '/blog', // Base path for item links
limit: 25, // Max items (default: 50)
fields: { // Field mapping (optional)
title: 'title',
description: 'summary',
date: 'publishedAt',
category: 'tag',
},
},
},
}
Field Mapping
By default, the module maps these collection fields to RSS item fields:
| RSS Field | Default Collection Field |
|---|---|
<title> | title |
<description> | description |
<link>, <guid> | path |
<pubDate> | date |
<category> | label |
Override any of these with the fields option if your collection uses different field names.
Feeds Page
Create a content page to list all available feeds:
---
title: RSS Feeds
description: Subscribe to our content feeds.
---
::u-container
::rss-feed-list
::
::
Add a route rule in nuxt.config.ts:
routeRules: {
'/rss-feeds': { appLayout: 'default' },
}
The RssFeedList component reads the feed configuration automatically and renders each feed with Copy URL and View XML actions.
RSS Button
Use the ConvertRss component to add an RSS icon button alongside social links. It links to the feeds page.
::convert-rss
---
location: hero
---
::
Props: location (required), size, variant, color — same styling API as ConvertSocial.
Feed Discovery
Add an RSS <link> to the page head for feed auto-discovery:
---
title: Decisions
hasRss: true
---
The default layout checks hasRss and injects the appropriate <link rel="alternate"> tag.
Feed Format
Generated feeds follow RSS 2.0 with Dublin Core and Atom extensions:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Site Name - Collection</title>
<link>https://yoursite.com</link>
<description>Feed description</description>
<atom:link href="..." rel="self" type="application/rss+xml"/>
<item>
<title>Entry Title</title>
<link>https://yoursite.com/blog/my-post</link>
<guid isPermaLink="true">https://yoursite.com/blog/my-post</guid>
<pubDate>Mon, 01 Jan 2026 00:00:00 GMT</pubDate>
<dc:creator>Author Name</dc:creator>
<description>Entry description</description>
<category>Updates</category>
</item>
</channel>
</rss>
Custom Handlers
For feeds that don't map to a simple collection query, register a handler in a Nitro plugin:
import { registerRSSHandler } from '#imports'
export default defineNitroPlugin(() => {
registerRSSHandler('custom', async (event) => {
// Build your XML however you want
return '<?xml version="1.0"?>...'
})
})
The handler receives an H3Event and must return an XML string.