Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js blog starter with sitemap and RSS feed, Markdown, Prism syntax highlighting, Tailwind CSS v3.0, Google Analytics, SendGrid

Fully customizable personal portfolio and blog website made with Spring Boot
Next.js Blog Starter is an open-source blog template for Next.js that turns Markdown files in a /_posts directory into a production-ready blog with generated sitemap, RSS feed, and Tailwind CSS styling.
Next.js Blog Starter is a blog starter built to be installed with create-next-app, developed by sandypockets. It takes Markdown posts with YAML front matter as input and outputs a complete Next.js blog with homepage, about, and contact pages. The starter bundles dark mode, Google Analytics, a SendGrid-powered contact form, and automatic sitemap and RSS generation. It is built with React, Next.js, Tailwind CSS v3.0, Remark, and Gray Matter.
.md files in /_posts; remark and remark-html convert the Markdown to HTML, and gray-matter reads each post's metadata.@tailwindcss/forms for form styling.public/sitemap.xml and public/robots.txt after every build; you configure your base URL and locale in scripts/generate.sitemap.mjs.public/feed.xml, served at /feed.xml, after you set your blog URL in scripts/generate-rss.mjs.prism-themes..env.local.example to .env.local and insert your Google tag ID to enable analytics..env.local; a free SendGrid account allows up to 100 emails per day.create-next-app and immediately get a styled blog with SEO features like sitemap and RSS.npm run new your-post-title.Blog posts are Markdown files placed in /_posts, each requiring the front matter keys: title, excerpt, coverImage, date, author, and ogImage. The post slug is derived from the filename, so kobe.md becomes /posts/kobe. Running npm run dev starts the development server at localhost:3000; running npm run build generates the sitemap, robots file, and RSS feed in the public directory. Built and tested with Node v20.11.1.
Yes, the starter is open source on GitHub and installed through create-next-app. The repository page does not list a license or paid tier.
Run npx create-next-app --example https://github.com/sandypockets/nextjs-blog-starter/tree/main nextjs-blog-starter, then cd nextjs-blog-starter && npm install and npm run dev.
Run npm run new your-post-title to scaffold a post with default front matter, or create a .md file in /_posts with the required front matter and add images under /public/assets/blog.
Open pages/_app.js and replace the prism-dracula.css import in the prism-themes import on line 5 with another theme file name, such as prism-duotone-sea.css.
It includes Google Analytics and a SendGrid contact form, both configured through .env.local. SendGrid's free account is limited to 100 emails per day, as noted in the README.
