Building Static Sites with Next.js and Markdown
Next.js
Next.js is the ultimate toolkit for building modern static sites with dynamic power.
βοΈ Markdown + MDX
Use next-mdx-remote
or contentlayer
to render blog content from markdown:
tsximport { MDXRemote } from 'next-mdx-remote';export default function Post({ source }) {return <MDXRemote {...source} />;}
π Recommended Folder Structure
/content
/posts
hello-world.mdx
/pages
/blog
[slug].tsx
π Deploy to Vercel
bashgit push origin main# Auto-deploy to your-domain.vercel.app
Next.js lets you start static and scale to dynamic β all in one framework.
βStatic first, dynamic as needed.β β Guillermo Rauch