A new version of our organization's blog: Kir-Dev. Previous version v1 was built with Jekyll and v2 was built with Gatsby. This version is built with Next.js and Sanity.
Generated from this starter.
Before you start development, make sure you have
corepack enable
to use Yarn v4.npm install --global sanity@latest
).Clone this repo to your work directory.
git clone https://github.com/kir-dev/blog-next-sanity.git
Open the repo in VSCode and open up a terminal in it, run this to link your clone to Vercel (make sure we've already added you as a collaborator to the project on Vercel):
npx vercel link
Download the environment variables needed to connect Next.js and the Studio to your Sanity project:
npx vercel env pull
This will create a git-ignored .env
file with environment variables that will be used for local development.
yarn install && yarn dev
When you run this development server, the changes you make in your frontend and studio configuration will be applied live using hot reloading.
Your blog should be up and running on http://localhost:3000! You can create and edit content on http://localhost:3000/studio.