RSS Feeds
Subscribe to documentation updates via RSS, Atom, or JSON feeds
Source: apps/web/content/docs/features/rss-feeds.mdx
Subscribe to AI Web Feeds documentation updates using RSS, Atom, or JSON feeds.
Available Feeds
Feed URLs
Sitewide Feeds
Subscribe to all content:
https://yourdomain.com/rss.xml Standard RSS 2.0 format, compatible with most feed readers.https://yourdomain.com/atom.xml Atom 1.0 format with extended metadata support.https://yourdomain.com/feed.json Modern JSON-based feed format.Documentation Feeds
Subscribe to documentation updates only:
https://yourdomain.com/docs/rss.xmlhttps://yourdomain.com/docs/atom.xmlhttps://yourdomain.com/docs/feed.jsonFeeds are automatically discoverable via <link> tags in the HTML head for compatible feed readers.
Feed Readers
Popular RSS Readers
Choose your preferred feed reader:
- Feedly - Web-based, mobile apps
- Inoreader - Advanced features, filtering
- NetNewsWire - Native Mac/iOS app
- Reeder - Beautiful Mac/iOS app
- The Old Reader - Classic Google Reader style
Command Line
Use curl to fetch feeds:
# RSS 2.0
curl https://yourdomain.com/rss.xml
# Atom 1.0
curl https://yourdomain.com/atom.xml
# JSON Feed
curl https://yourdomain.com/feed.json | jqFeed Content
What's Included
Each feed item contains:
| Field | Description |
|---|---|
| Title | Page title |
| Description | Page description or excerpt |
| Link | Full URL to the page |
| Date | Last modified date |
| Category | Content category (Features, Guides, etc.) |
| Author | AI Web Feeds Team |
Categories
Content is categorized automatically:
- Features - Feature documentation
- Guides - How-to guides and tutorials
- Documentation - General documentation pages
How It Works
Feed Generation
Feeds are generated using the feed package:
import { Feed } from "feed";
import { source } from "@/lib/source";
export function getDocsRSS() {
const feed = new Feed({
title: "AI Web Feeds - Documentation",
id: `${baseUrl}/docs`,
link: `${baseUrl}/docs`,
language: "en",
description: "Documentation updates...",
});
for (const page of source.getPages()) {
feed.addItem({
id: `${baseUrl}${page.url}`,
title: page.data.title,
description: page.data.description,
link: `${baseUrl}${page.url}`,
date: new Date(page.data.lastModified),
});
}
return feed;
}Route Handlers
Next.js route handlers serve the feeds:
import { getDocsRSS } from "@/lib/rss";
export const revalidate = 3600; // Revalidate every hour
export function GET() {
const feed = getDocsRSS();
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600, s-maxage=86400",
},
});
}Metadata Discovery
Feeds are discoverable via metadata:
export const metadata: Metadata = {
alternates: {
types: {
"application/rss+xml": [
{
title: "AI Web Feeds - Documentation",
url: "/docs/rss.xml",
},
],
},
},
};Caching Strategy
Feeds are cached for performance:
| Cache Layer | Duration | Purpose |
|---|---|---|
| Browser | 1 hour | Client-side caching |
| CDN | 24 hours | Edge caching |
| Revalidation | 1 hour | Server regeneration |
Testing
Test Feed URLs
Visit the feed URLs directly in your browser:
# Test RSS feed
curl http://localhost:3000/rss.xml | head -50
# Test Atom feed
curl http://localhost:3000/atom.xml | head -50
# Test JSON feed
curl http://localhost:3000/feed.json | jq
# Check headers
curl -I http://localhost:3000/rss.xmlUse the W3C Feed Validator:
- Visit https://validator.w3.org/feed/
- Enter your feed URL
- Click "Check"
- Review validation results
Verify Feed Discovery
Check that feeds are discoverable:
# View HTML head
curl http://localhost:3000 | grep -i "alternate"
# Expected output:
# <link rel="alternate" type="application/rss+xml" ... />Test Feed Reader
- Open your feed reader
- Click "Add Feed" or "Subscribe"
- Enter feed URL:
http://localhost:3000/rss.xml - Verify items appear correctly
Customization
Update Base URL
Set your production URL:
NEXT_PUBLIC_BASE_URL=https://yourdomain.comModify Feed Metadata
Edit lib/rss.ts:
const feed = new Feed({
title: "Your Custom Title",
description: "Your custom description",
copyright: "All rights reserved 2025, Your Name",
// Add more fields...
});Add Custom Fields
Extend feed items with custom data:
feed.addItem({
id: `${baseUrl}${page.url}`,
title: page.data.title,
description: page.data.description,
link: `${baseUrl}${page.url}`,
date: new Date(page.data.lastModified),
// Custom fields
image: page.data.image,
content: await getPageContent(page),
// More custom fields...
});Filter Content
Control which pages appear in feeds:
const pages = source
.getPages()
.filter((page) => !page.data.draft) // Exclude drafts
.filter((page) => page.url.startsWith("/docs")); // Only docsBest Practices
1. Set Last Modified Dates
Add lastModified to frontmatter:
---
title: My Page
description: Description
lastModified: 2025-10-14
---2. Write Good Descriptions
Provide clear, concise descriptions:
---
title: RSS Feeds
description: Subscribe to documentation updates via RSS, Atom, or JSON feeds
---3. Use Proper Categories
Organize content with meaningful categories:
category: page.url.includes("/api/") ? [{ name: "API Reference" }] : [{ name: "Guides" }];4. Cache Appropriately
Balance freshness with performance:
export const revalidate = 3600; // 1 hourTroubleshooting
Feed Not Updating
bash rm -rf .next/ pnpm dev Invalid XML
- Ensure special characters are escaped
- Validate with W3C Feed Validator
- Check for proper UTF-8 encoding
Missing Items
- Verify
source.getPages()returns all pages - Check filter conditions
- Ensure frontmatter is complete
Slow Generation
- Reduce number of items
- Implement pagination
- Increase revalidation time
Future Enhancements
Potential additions:
- Blog feed - Separate feed for blog posts
- Category feeds - Individual feeds per category
- Per-author feeds - Filter by author
- Full content - Include complete page content
- Media enclosures - Attach images/files
- Podcasting support - iTunes RSS extensions
Related Documentation
- AI Integration - AI/LLM endpoints
- Quick Reference - Commands and endpoints
- Testing Guide - Verify your setup