feat(blog): add /blog/rss.xml feed (fixes 404)#2
Merged
Conversation
Add a Next.js route handler at app/blog/rss.xml/route.ts that emits a valid RSS 2.0 feed from getBlogList() (published blog_posts). Includes per-post title/link/guid/pubDate, excerpt, dc:creator, tag categories, an atom:link rel="self", hourly revalidate, and CDN cache headers. Also add an application/rss+xml alternate to the blog page metadata for feed autodiscovery. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
https://saasrow.com/blog/rss.xmlreturned a 404 — there was no route serving it. The blog only hadapp/blog/page.tsxandapp/blog/[slug]/page.tsx.Changes
app/blog/rss.xml/route.ts— new Next.js route handler emitting a valid RSS 2.0 feed fromgetBlogList()(publishedblog_posts). Per-itemtitle/link/guid/pubDate, plusdescription(excerpt),dc:creator, and tag<category>s; channelatom:link rel="self"; hourlyrevalidate; CDN cache headers. Uses the sameNEXT_PUBLIC_SITE_URL→https://www.saasrow.comfallback asrobots.ts/sitemap.ts.app/blog/page.tsx— added anapplication/rss+xmlalternate to metadata for feed autodiscovery.Verification
npx tsc --noEmitpasses.trackReferralCode→NextResponse.next()) passes the request through; it does not intercept the feed.🤖 Generated with Claude Code