Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js personal website with embedded Sanity CMS, live previews, and real-time collaboration.
Sanity + Next.js Personal Website is a boilerplate starter that pairs a Next.js frontend with Sanity CMS, yielding a personal website with an embedded authoring environment, live previews, and real-time collaboration. It is maintained by the Sanity team and published under the sanity-io GitHub organization.
The template is a personal website starter that uses Next.js for the frontend and Sanity for content management. It takes content defined by Sanity schemas (pre-configured Page and Project document types) and renders it as a static site with dynamic refresh, and it exposes a full Sanity Studio at the /studio route. It runs on Next.js Cache Components, so every page prerenders into a static shell and updates through Sanity Live when content changes, without requiring a rebuild.
cacheComponents: true in next.config.ts and configures cacheLife to Sanity Live, prerendering pages as a static shell while still refreshing content on changes./app/studio/[[...tool]]/Studio.tsx and accessible at yourpersonalwebsite.com/studio, with configuration in sanity.config.ts./app/api/draft-mode/enable/route.ts serverless route triggers Draft Mode, and Visual Editing overlays keep working while the static shell is prerendered in production.The Sanity + Next.js Personal Website template suits developers who want a modern personal site with a CMS already wired in. It is also a practical learning resource for anyone wanting to understand Next.js Cache Components, Sanity Live, and the three-layer data fetching pattern (Page → Dynamic → Cached) used in the app routes.
To get started, initialize the template with the Sanity CLI using npm create sanity@latest -- --template sanity-io/template-nextjs-personal-website, then start the development server with npm run dev. Open http://localhost:3000 for the site and http://localhost:3000/studio for the Studio, log in, create a Project document, and publish it to see the live update. For production, deploy the Next.js app to Vercel (or any hosting provider) and configure the environment variables.
Delete the IntroTemplate component in /app/(website)/layout.tsx — the README states this as the way to remove that block from the personal site.
Yes — the template ships with Page and Project document types in /sanity/schemas, and you can add more document types following the Sanity schema documentation.
Yes, the Studio connects to Sanity Content Lake. The README says a free Sanity project includes unlimited admin users, free content updates, and pay-as-you-go for API overages.
The README points to Next.js GitHub Discussions, Sanity's GitHub Discussions, and Sanity's Community Slack for support.
The README notes you are free to deploy the Next.js app to your hosting provider of choice; Vercel and GitHub are covered as a popular approach.
