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
- Node.js v20 installed (I recommend using NVM - on Windows too).
- After installing run
corepack enableto use Yarn v4.
- After installing run
- been added to our Vercel project as a collaborator.
- been added to our Sanity project as a collaborator.
- Sanity Studio installed globally (
npm install --global sanity@latest).
Clone this repo to your work directory.
git clone https://github.com/kir-dev/blog-next-sanity.gitOpen 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 linkDownload the environment variables needed to connect Next.js and the Studio to your Sanity project:
npx vercel env pullThis will create a git-ignored .env file with environment variables that will be used for local development.
yarn install && yarn devWhen 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.
- Setup live preview
- Join our Slack community to ask questions and get help
- How to edit my content structure?
- How to query content?
- What is content modelling?
- Frontpage images by
- Photo by Fili Santillán on Unsplash