Sanity CMS with Next.js: Production Guide

14 articles
Hub + 13 spokes

Series Overview

Master Sanity CMS with Next.js: schema setup, TypeGen, GROQ queries, webhooks, markdown editing, document previews, and production workflows.

All Articles in Series

H
Integrating Sanity.io with Next.js 15: A Step-by-Step Guide
HUB1 of 14

Integrating Sanity.io with Next.js 15: A Step-by-Step Guide

Create a Powerful, Easy-to-Manage Blog with Sanity and Next.js

Feb 28, 2025By Matija Žiberna
1
How I Added Image Gallery Support to Sanity CMS with Markdown Editor Integration
PART 12 of 14

How I Added Image Gallery Support to Sanity CMS with Markdown Editor Integration

Upgrading Markdown in Sanity CMS with Modern Image Gallery Support

How I improved my Sanity CMS workflow by adding image gallery support to the Markdown editor—making image handling faster, cleaner, and way less frustrating.

12 min readJul 23, 2025By Matija Žiberna
2
Build a Custom Blog Commenting System with Next.js 15 and Sanity CMS
PART 23 of 14

Build a Custom Blog Commenting System with Next.js 15 and Sanity CMS

Take control of your blog's comments with a modern, extendable system built using Next.js 15 App Router, React Server…

A step-by-step guide to building a modern, styled commenting system for your blog using Next.js 15 and Sanity—no plugins, full control.

24 min readJul 29, 2025By Matija Žiberna
3
How to Update Sanity Schema in Nextjs 15
PART 34 of 14

How to Update Sanity Schema in Nextjs 15

A practical guide to updating your Sanity schema in modern Next.js 15 apps — simplified and developer-friendly.

May 15, 2025By Matija Žiberna
4
How To Add Markdown Support to Sanity Studio
PART 45 of 14

How To Add Markdown Support to Sanity Studio

Adding Markdown Support to Sanity Studio: Want a Better Content Editing Experience? This guide shows you how to add…

13 min readMar 7, 2025By Matija Žiberna
5
How to Generate TypeScript Types for Your Sanity V3 Schema
PART 56 of 14

How to Generate TypeScript Types for Your Sanity V3 Schema

Automatically generate accurate TypeScript types from your Sanity schema to catch errors early and speed up your development workflow.

May 16, 2025By Matija Žiberna
6
How To Add Markdown Support to Sanity Studio
PART 67 of 14

How To Add Markdown Support to Sanity Studio

Adding Markdown Support to Sanity Studio: Want a Better Content Editing Experience? This guide shows you how to add Markdown, render it in Next.js, and handle SEO.

Mar 7, 2025By Matija Žiberna
7
GROQ vs GraphQL: Complete Guide to Choosing the Right Query Language (2025)
PART 78 of 14

GROQ vs GraphQL: Complete Guide to Choosing the Right Query Language (2025)

Compare query languages for content vs. application data: when to use GROQ with Sanity vs GraphQL for complex APIs

Comprehensive comparison of GROQ and GraphQL: understand when to choose each query language for content-driven applications vs. complex multi-source APIs.

12 min readSep 15, 2025By Matija Žiberna
8
Keep Your Sanity-Powered Blog Static in Next.js 15
PART 89 of 14

Keep Your Sanity-Powered Blog Static in Next.js 15

Discover essential steps to eliminate dynamic fetches and maintain static routes with Sanity and Next.js 15.

Learn to optimize your Sanity-powered blog in Next.js 15 by keeping pages static and reducing server calls with simple steps.

7 min readOct 29, 2025By Matija Žiberna
9
How to Programmatically Import Markdown Blog Articles to Sanity CMS
PART 910 of 14

How to Programmatically Import Markdown Blog Articles to Sanity CMS

Build a CLI script that transforms frontmatter-powered markdown into structured Sanity documents

Learn how to create a TypeScript CLI tool that parses markdown files with YAML frontmatter and automatically creates Sanity CMS documents, including FAQs and How-To steps.

10 min readAug 11, 2025By Matija Žiberna
10
How to Add Custom Sorting Options to Sanity CMS Document Lists
PART 1011 of 14

How to Add Custom Sorting Options to Sanity CMS Document Lists

Customize Sanity Studio lists with defaultOrdering and orderingMenuItem for better workflows

Learn to add custom sorting options to Sanity Studio document lists using the structure tool, including default sort, multi-field ordering, and domain-specific sorts.

5 min readSep 21, 2025By Matija Žiberna
11
How to Customize Document Previews in Sanity CMS Studio
PART 1112 of 14

How to Customize Document Previews in Sanity CMS Studio

Use select and prepare to show dates, status, references, and computed info

Learn to tailor Sanity Studio document previews with select and prepare: display publication dates, statuses, reference fields, media fallbacks, and computed summaries.

7 min readSep 22, 2025By Matija Žiberna
12
Sanity TypeGen: Optimal Project Structure and Production Workflow (2025 Update)
PART 1213 of 14

Sanity TypeGen: Optimal Project Structure and Production Workflow (2025 Update)

Scale TypeGen from basic setup to production-ready system with optimal project structure, advanced query organization, and bulletproof development workflow

Complete guide to implementing Sanity TypeGen at scale: project structure, query organization, type generation workflow, and production deployment strategies for large applications.

14 min readSep 16, 2025By Matija Žiberna
13
How to Create Secure Sanity CMS Webhooks with Next.js App Router
PART 1314 of 14

How to Create Secure Sanity CMS Webhooks with Next.js App Router

Implement HMAC signature verification and selective revalidation using @sanity/webhook in App Router

Secure your Sanity webhook endpoint in Next.js App Router with signature verification, raw body parsing, GROQ filters, and safe cache revalidation.

9 min readSep 12, 2025By Matija Žiberna

Topics Covered

Sanity CMSNext.jsGROQTypeGenwebhooksheadless CMSSanity Studiomarkdown