TestGatsbySanity/README.md
2019-05-09 10:15:41 -05:00

38 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TestGatsbySanity
_A portfolio using structured content and a static site builder._
Deployed from [sanity.io/create](https://www.sanity.io/create/?template=sanity-io%2Fsanity-template-gatsby-portfolio).
## What you have
- A blazing fast portfolio with [Gatsby.js](https://gatsbyjs.org)
- Structured content using [Sanity.io](https://www.sanity.io)
- Global deployment on [Netlify](https://netlify.com)
## Quick start
1. Clone this repository from your GitHub account
2. `npm install` in the project root folder on local
3. `npm run dev` to start the studio and frontend locally
- Your studio should be running on [http://localhost:3333](http://localhost:3333)
- Your frontend should be running on [http://localhost:8000](http://localhost:8000)
4. `npm run build` to build to production locally
## Enable real-time content preview on development
1. Go to your [projects API settings on manage.sanity.io](https://manage.sanity.io/projects/dkwlsoid/settings/api) and create a token with read rights.
2. Rename `.env.development.tenplate` to `.env.development` and paste in the token: `SANITY_READ_TOKEN="yourTokenHere"`.
3. Restart the development server (`ctrl + C` and `npm 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](https://www.netlify.com/docs/continuous-deployment/#branches-deploys).
## Stuck? Get help
[![Slack Community Button](https://slack.sanity.io/badge.svg)](https://slack.sanity.io/)
Join [Sanitys developer community](https://slack.sanity.io) or ping us [on twitter](https://twitter.com/sanity_io).