Most Markdown blogs can publish a feed and a sitemap with one small script. The feed lets readers and feed readers find new posts. The sitemap tells search engines which URLs exist and when they changed. Both files come from the same front matter, so they stay in sync when you add a post. I’ll walk through a Node.js script that reads posts from content/posts, skips drafts, sorts by date, and writes feed.xml and sitemap.xml into public/. Then I’ll wire it into the build on Vercel. 1. Front matter for each post Each post is a Markdown file with a small YAML block at the top. Use ISO dates (2025-03-04). They are the easiest format to parse reliably. — title: “Why my scraper keeps getting blocked” date: 2025-03-04 description: “Rate limits, headers and the three things I check first.” slug:…
How to Generate an RSS Feed and sitemap.xml for a Markdown Blog in Node.js
Advertisement