npm create sanity@latest -- --template nuotsu/sanitypress
🚀 Getting Started
A quick setup. A lasting impact.
1. Install with the Sanity CLI¶
You can also clone or fork the GitHub template to set up manually.
2. Set environment variables¶
NEXT_PUBLIC_BASE_URL="" # https://sanitypress.dev
NEXT_PUBLIC_SANITY_PROJECT_ID="..."
NEXT_PUBLIC_SANITY_DATASET="production"
SANITY_API_READ_TOKEN="..."
NEXT_PUBLIC_SANITYPRESS_PRO_LICENSE_KEY="..."
NEXT_PUBLIC_GITHUB_TOKEN="" # recommended to add to display GitHub stars & forks
3. Start local servers¶
Run the following command to start the development server:
- Website: http://localhost:3000
- Sanity Studio: http://localhost:3000/admin
npm run dev
4. Add content¶
In your new Sanity Studio, publish the required site
and page
documents:
Document | Slug | Use | Required? | Notes |
---|---|---|---|---|
site |
Global settings | ✅ | ||
page |
index |
Homepage | ✅ | |
page |
404 |
Page not found | ||
page |
blog |
Blog listing | Add the Blog frontpage module | |
global-module |
blog/ (path) |
Blog post | Add the Blog post content module |
Alternatively, you can import the demo site dataset:
sanity dataset import src/sanity/demo.tar.gz
5. Set up deployments¶
Add a Vercel or Netlify widget to enable deployments from the Studio.
6. Customize¶
Adjust frontend styles, edit/add schema and modules, and more.
Helpful Articles
Read more on The Styled Heart Blog
SanityPress now includes automatic Open Graph image generation courtesy of next/og, making your shared content more engaging with zero configuration.
- Mitchell Christ
- Updates
- Customization
Learn how to easily update your blog's URL path in SanityPress. Follow our step-by-step guide to change /blog to any custom path.
- Mitchell Christ
- Customization
Discover how to customize every aspect of your SanityPress site. Unlock the power to create a truly unique and polished web experience.
- Mitchell Christ
- Customization
- Pro Tips
Learn how to customize your SanityPress site's theme by changing accent colors with Tailwind CSS, featuring easy-to-apply color tweaks for a fresh look.
- Mitchell Christ
- Customization
Learn how to add custom CSS to your SanityPress website using the Custom HTML module, enabling full design control directly from the CMS studio.
- Mitchell Christ
- Customization
- Modules
Optimize list previews in Sanity Studio to improve content editor workflow and productivity. Create better visual cues for a more intuitive CMS experience.
- Mitchell Christ
- Customization
- Pro Tips