Skip to content
/ sanitypress Public template

Fully customizable Next.js + Sanity Starter Template with Tailwind CSS

License

Notifications You must be signed in to change notification settings

nuotsu/sanitypress

Repository files navigation

🖤 SanityPress

Ready, Set, Impress.

An opinionated, fully customizable Next.js (App Router) and Sanity starter template with Tailwind CSS and pre-built schema for rapid website development.

Deploy with Vercel

Visit here for more Studio screenshots.

Table of Contents

Key Features

Getting Started

Directions are also found on the docs.

1. New repo

Clone or fork the template from the GitHub template.

2. Get a new Sanity project ID

From the Sanity.io Manage dashboard, create a new project from scratch (blank schema) with CLI.

3. Update environment variables

# .env.local
NEXT_PUBLIC_BASE_URL = ... # https://sanitypress.dev
NEXT_PUBLIC_SANITY_PROJECT_ID = ... # abcdefgh
NEXT_PUBLIC_SANITY_DATASET = ... # production

SANITY_API_READ_TOKEN = ... # "Viewer" token from https://sanity.io/manage

4. Populate the Studio with your content

Open your new Sanity Studio (‌https://localhost:3000/admin) and publish the following documents:

  1. a Site document with a title field.
  2. a Page document with slug: index to use as the Home page.

For websites with a blog, additionally publish the following documents:

  1. a Page document with slug: blog to use as the Blog listing page.
  2. a Page document with slug: blog/* to use as the Blog post template page.

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

Adjust frontend styles, edit/add Sanity schema and modules, and more.

External References

How to Support