Building a Static Blog with Next.js
Why markdown?
Markdown files are easy to write, version in Git, and pre-render at build time — similar to Astro or other SSG frameworks.
What this setup gives you
- Posts live in
content/blog/{locale}/*.md - Each locale has its own folder (
en,fa) - Pages are generated statically with
generateStaticParams - No database calls at runtime for blog content
Example code block
const posts = getAllPosts('en')
Happy writing!
nextjsmarkdown