Skip to content

surjithctly/pajamas

Repository files navigation

Pajamas JAMStack Starter

Pajamas is a JAMStack Starter template built with Next.js, Tailwind CSS & Sanity CMS.

Setup Sanity in the Next.js Frontend

First Install next-sanity plugin:

yarn add next-sanity

Add .env Variables

Open .env.local and add the sanity project id. If you want to set different dataset than production, you can add that as well (optional)

Heads up! Make sure you copy those .env variables to Vercel when you publish the project.

Setup Sanity Site Config

Every site has some global settings, We can manage them through Sanity. But as of now (May 2022) Sanity does not directly support singleton documents. So we do it using a simple hack. To do that, first we need to create a new site Settings Page in Sanity and then disable the create and delete __experimental_actions in /schemas/siteConfig.js so only one site-settings is created. (instead of an array)

About

Pajamas JAMStack Starter Template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published