Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 4.88 KB

README.md

File metadata and controls

102 lines (63 loc) · 4.88 KB

SanityPress

Ready, Set, Impress.

A opinionated, fully customizable Next.js and Sanity starter template with Tailwind CSS and pre-built schema for rapid website development.

Deploy with Vercel

⚛️ Neutrino, 🔭 Umbra and 🍃 Foliage themes now available as a bundle!

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
NEXT_PUBLIC_SANITY_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


Want to support future updates? Buy me a coffee ☕ or 🩷 Sponsor on GitHub!