NEXT_PUBLIC_BASE_URL = ... # https://sanitypress.dev
NEXT_PUBLIC_SANITY_PROJECT_ID = ... # abcdefgh
NEXT_PUBLIC_SANITY_DATASET = ... # production
NEXT_PUBLIC_SANITY_TOKEN = ... # retrieve from https://sanity.io/manage
π Getting Started
1. New repoπ
Clone or fork the template from the GitHub repo.
2. Start a new Sanity projectπ
From the Sanity.io Manage dashboard, create a new project (blank schema) with CLI and retrieve a project id.
3. Update environment variablesπ
4. Populate the Sanity Studio with your contentπ
Open your new Sanity Studio (http://localhost:3000/admin
) and publish the following required documents:
- a Site document with a
title
field. - a Page document with slug:
index
to use as the Home page.
For websites with a blog, additionally publish the following documents:
- a Page document with slug:
blog
to use as the Blog listing page. - a Page document with slug:
blog/*
to use as the Blog post template page.- Make sure to add the Blog Post Content module to display the post's body content.
Optionally, you can publish the following documents:
- a Page document with slug:
404
to use as the Page not found page.
Import a demo datasetπ
You can run a CLI command to import demo content to get SanityPress up and running in seconds.
sanity dataset import sanity/demo.tar.gz
This will import a Site document and a Page document with slug: index
, the minimum requirements for SanityPress to deploy successfully.
5. Set up deploymentsπ
Install either of the following plugins to add a widget to your Studio Dashboard:
6. Customize the Next.js frontendπ
Adjust frontend styles (like animations or fonts), edit/add schema and modules, and more.
Helpful Articles
Read more on The SanityPress Blog