Deployment
Deployment
Section titled “Deployment”Introduction
Section titled “Introduction”Deploying a content-driven blog is straightforward with Vercel. The key decision is how to handle new posts: rebuild the site on every push (static) or use Incremental Static Regeneration (ISR).
Option 1: Static Export (Simplest)
Section titled “Option 1: Static Export (Simplest)”If your blog content is in Markdown files committed to the repo:
# Push to GitHub — Vercel auto-deploysgit add .git commit -m "Add new blog post"git pushEvery push triggers a new build. All post pages are generated at build time.
Option 2: ISR with a Headless CMS
Section titled “Option 2: ISR with a Headless CMS”If you use a CMS like Sanity or Contentful, use ISR and revalidation:
export default async function PostPage({ params,}: { params: Promise<{ slug: string }>}) { const { slug } = await params const post = await fetchPostFromCMS(slug)
return <PostContent post={post} />}Environment Variables
Section titled “Environment Variables”If using a headless CMS:
# Vercel Dashboard → Project → Settings → Environment VariablesCMS_API_KEY=your_api_keyCMS_PROJECT_ID=your_project_idPerformance Checklist
Section titled “Performance Checklist”- All posts render as static HTML
- Code blocks have syntax highlighting
- Images use
next/imagewith proper sizing - Sitemap is accessible at
/sitemap.xml - RSS feed works at
/feed.xml - Open Graph images render for each post
- Build doesn’t fail when adding new posts
Summary
Section titled “Summary”Deploy via GitHub for automatic production builds. Use ISR if your content comes from a CMS. Always verify that the sitemap, RSS feed, and OG images work after deployment.