Skip to content
zenovicharis.
9 August 2025

Building an RSS Feed and Tag Pages in Next.js App Router

In this article, we walk through how to:

  • Read MDX posts with fs in a Server Component
  • Generate an RSS feed using xmlbuilder2
  • Create dynamic tag-based routes in app/blog/tag/[tag]/page.tsx

RSS generation can be done during build with getAllPosts() and a simple XML template, saving to public/rss.xml.

Tag pages can be generated by mapping each post's tags and creating corresponding routes in your App Router setup.

This makes your blog SEO-friendly and keeps it easy to navigate for your readers.

Contact.

For consulting, research, or mentorship.