Skip to content

tryhuset/internal-next-sanity-template

Repository files navigation

Internal Next Sanity Template

This template is the foundation for a Next.js app with a router and Sanity 3 live preview. Sanity is embedded under the path: /studio.

Features

  • Live previews using next-sanity
  • Customized Sanity Desk Tool
  • Just TypeScript
  • Eslint configuration
  • Environment variables

User Manual

Step 1. Vercel deployment

  1. Deploy with Vercel:

    Deploy with Vercel

  2. Make sure you are logged in to Try Huset in the top left corner

  3. Follow the required steps and add a temporary environment variable for NEXT_PUBLIC_URL

  4. Replace the environment variable and redeploy in Vercel

Step 2. Set up the project locally

  1. Clone the repository then run the following command from the project's root directory:
npx vercel link
  1. Download the environment variables needed to connect Next.js and the Studio to your Sanity project:
npx vercel env pull
  1. Run Next.js locally in development mode
pnpm install && pnpm run dev

Customization Recommendation

To get started with customizing your Sanity Desk Tool, we recommend using the Themer tool.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published