The Sanity + Next.js Guide
Everything I've written on building with Sanity CMS and the Next.js App Router — grouped by topic, from getting started to Studio customisation. 33 articles, all from real production builds.
01
Getting started
Set up the stack, typed queries, and a working Studio.
02
GROQ & data modelling
Query and shape content without waterfalls.
How I write advanced GROQ queries with joins, coalesce, and array flattening in SanityJun 2026 · 6 min readHow I build Sanity Portable Text custom components in Next.jsMay 2026 · 6 min readHow I set up Sanity TypeGen for fully typed GROQ queries in TypeScriptMay 2026 · 6 min readSanity CMS vs Contentful for Next.js projects: an honest comparisonMay 2026 · 6 min readHow I replaced Sanity's default slug generator with a custom validation hook to catch duplicate slugs before publishMay 2026 · 4 min readHow I Handle Conditional GROQ Projections to Cut Query Payload by 60%May 2026 · 5 min readHow I Model Sanity References to Avoid N+1 Queries in Next.js RSCMay 2026 · 5 min readHow I Model Multi-Locale Navigation in Sanity Without Bloating Page QueriesApr 2026 · 5 min readHow I Structure Sanity Schemas to Avoid Query Waterfalls in Next.jsApr 2026 · 5 min readHow I Shaved 140 kB Off a Next.js Bundle by Lazy-Loading Sanity Portable TextApr 2026 · 5 min read
03
Draft mode & preview
Live preview and secure draft flows at the edge.
04
Images & media
Sanity's image pipeline, CLS, and video.
How I use @next/bundle-analyzer to find and fix Next.js bundle size bloatJun 2026 · 5 min readHow I cut Next.js bundle size by analysing and reducing chunk bloatMay 2026 · 5 min readHow I wire Mux video into a Next.js + Sanity CMS upload workflowMay 2026 · 6 min readHow I serve WebP and AVIF from Sanity without double-encoding in Next.jsMay 2026 · 6 min readHow I derive sizes, width, and height from Sanity metadata to kill CLSMay 2026 · 6 min readHow I wire next/image to Sanity hotspot focal point data for pixel-perfect cropsMay 2026 · 6 min readHow I keep Sanity image pipelines under 50 kB using LQIP hashes and blur overlaysApr 2026 · 5 min read
05
Revalidation & webhooks
Keep published content fresh with ISR.
06
Internationalization
Multi-locale content and navigation.
07
Sanity Studio & workflow
Shape the Studio around how editors actually work.
How I set up Sanity document-level permissions with role-based access controlJun 2026 · 6 min readHow I build a Sanity Studio custom input component with a colour pickerJun 2026 · 6 min readHow I build a custom Sanity document actions publishing workflowJun 2026 · 7 min readHow I Handle Sanity Content Versioning Without Breaking Client PagesMay 2026 · 5 min readHow I audit and prune unused Sanity document types to reclaim Studio performanceMay 2026 · 5 min readHow I use Sanity's structure builder to hide draft noise and speed up editor workflowMay 2026 · 4 min read
Want this built, not just documented?
I take on Sanity CMS + Next.js builds and migrations for startups and agencies — fixed price, staging URL from day one.