Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Starter template for a blog or marketing site using Next.js 13 App Router and Sanity CMS.
The Next.js Sanity Template is a boilerplate for building a blog or marketing site with Next.js 13, Sanity CMS, and Tailwind CSS.
This is a starter project that pairs Next.js 13's App Router with Sanity.io headless CMS. It outputs a public frontend plus an embedded Sanity Studio at /studio, with content modeled around two slug-driven sources: a frontpage and a posts list. The codebase is TypeScript and uses the next-sanity library for data fetching.
NEXT_PUBLIC_SANITY_PROJECT_ID, NEXT_PUBLIC_SANITY_DATASET, and SANITY_API_READ_TOKEN.npm run dev starts the frontend on localhost:3000 and Studio on localhost:3000/studio; add localhost to Sanity's CORS Origins.This template is aimed at developers who want a pre-configured blog or marketing site backed by Sanity CMS. It suits JAMstack developers, agency teams, and content teams that need an editable frontpage and blog without building the Sanity integration from scratch.
.env file.npm run dev — the frontend appears at localhost:3000 and Sanity Studio at localhost:3000/studio.Yes, it is built on Next.js 13 with the new app directory and router.
You need NEXT_PUBLIC_SANITY_PROJECT_ID, NEXT_PUBLIC_SANITY_DATASET, and SANITY_API_READ_TOKEN, set as plain text variables.
After starting the dev server, Sanity Studio runs at localhost:3000/studio.
The frontend start page is fetched with the slug "frontpage" and the posts list with the slug "posts".
