Fast Blog with Gatsby, Structured content using Sanity.io, using Netlify CDN
Fully customizable blog template with a React.js front-end.
Deployed from sanity.io/create.
What you have
Quick start
- Clone this repository
npm install
in the project root folder on localnpm run dev
to start the studio and frontend locally- Your studio should be running on http://localhost:3333
- Your frontend should be running on http://localhost:8000
npm run build
to build to production locally
Enable real-time content preview on development
- Go to your project’s API settings on manage.sanity.io and create a token with read rights.
- Rename
.env.development.template
to.env.development
and paste in the token:SANITY_READ_TOKEN="yourTokenHere"
. - Restart the development server (
ctrl + C
andnpm run dev
).
If you want to turn off preview you can set watchMode: false
in gatsby-config.js. If you just want to preview published changes you can set overlayDrafts: false
in gatsby-config.js.
Deploy changes
Netlify automatically deploys new changes commited to master on GitHub. If you want to change deployment branch, do so in build & deploy settings on Netlify.
Stuck? Get help
Join Sanity’s developer community or ping us on twitter.
Sanity Project info
SANITY PROJECT
Project ID u7tr3btf Dataset production APPS
Frontend
https://sanity-gatsby-blog-web-fcmdnzgb.netlify.app
APIS
GROQ https://u7tr3btf.api.sanity.io/v1/groq/production GraphQL https://u7tr3btf.api.sanity.io/v1/graphql/production/default
CODE
GitHub repo https://github.com/coding-to-music/sanity-gatsby-blog
Netlify Dashboard
https://app.netlify.com/sites/sanity-gatsby-blog-studio-s6cyg9nt/overview
Sanity Studio Dashboard
https://sanity-gatsby-blog-studio-s6cyg9nt.netlify.app/dashboard