All Projects → kevinwolfdev → Gatsby Sanity Now Starter

kevinwolfdev / Gatsby Sanity Now Starter

Licence: mit
✨ Gatsby + Sanity CMS + Now.sh deployment

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gatsby Sanity Now Starter

Gatsby Starter Ghost
A starter template to build lightning fast websites with Ghost & Gatsby
Stars: ✭ 752 (+1571.11%)
Mutual labels:  gatsbyjs
Now Clear
A utility to delete all zeit now instances that aren't aliased
Stars: ✭ 12 (-73.33%)
Mutual labels:  zeit
Gatsby Remark Embed Gist
Gatsby remark gists preprocessor
Stars: ✭ 30 (-33.33%)
Mutual labels:  gatsbyjs
Leonids
A simple, fixed sidebar two columns Gatsby.js blog starter.
Stars: ✭ 813 (+1706.67%)
Mutual labels:  gatsbyjs
Bonneville
A simple, clean GatsbyJS starter for those looking to get up and running with Gatsby
Stars: ✭ 23 (-48.89%)
Mutual labels:  gatsbyjs
Gatsby Plugin Meta Redirect
Write Gatsby redirects to html files with a meta refresh
Stars: ✭ 18 (-60%)
Mutual labels:  gatsbyjs
Micro Router
🚉 A tiny and functional router for Zeit's Micro
Stars: ✭ 621 (+1280%)
Mutual labels:  zeit
Gatsby Starter Spectral
Gatsby.js V2 starter template based on Spectral by HTML5 UP
Stars: ✭ 34 (-24.44%)
Mutual labels:  gatsbyjs
Awesome Gatsby
⚛️ 📄 🚀 Awesome list for the mighty Gatsby.js, a blazing fast React static site generator.
Stars: ✭ 928 (+1962.22%)
Mutual labels:  gatsbyjs
Gatsby Storyblok Boilerplate
Gatsby starter template with Storyblok's headless cms and true preview
Stars: ✭ 30 (-33.33%)
Mutual labels:  gatsbyjs
Gatsby Ghost Balsa Starter
A Gatsby starter for creating blogs from headless Ghost CMS.
Stars: ✭ 17 (-62.22%)
Mutual labels:  gatsbyjs
Jwt Example
Playing with user registration, login/logout, auth, etc using JWTs, serverless functions & faunadb as the data store.
Stars: ✭ 22 (-51.11%)
Mutual labels:  zeit
Unicorn Mart
A proof of concept e-commerce store leveraging Contentful, GatsbyJS, Stripe, and serverless via clay.run
Stars: ✭ 21 (-53.33%)
Mutual labels:  gatsbyjs
Atmo
✔️ Mock data for your prototypes and demos. Remote deployments to Zeit now.
Stars: ✭ 802 (+1682.22%)
Mutual labels:  zeit
Zeit
Zeit, erfassen. A command line tool for tracking time spent on activities.
Stars: ✭ 33 (-26.67%)
Mutual labels:  zeit
Gatsby Starter Minimal Blog
Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting.
Stars: ✭ 752 (+1571.11%)
Mutual labels:  gatsbyjs
Gatsby Starter Blog Grommet
A Gatsby v2 starter based on Grommet v2 UI. Demo:
Stars: ✭ 21 (-53.33%)
Mutual labels:  gatsbyjs
Zeit
Qt frontend to at & crontab CLI utilities
Stars: ✭ 42 (-6.67%)
Mutual labels:  zeit
Gatsby Starter 2column Portfolio
A minimalistic portfolio with a 2 column layout made for GatsbyJS.
Stars: ✭ 33 (-26.67%)
Mutual labels:  gatsbyjs
Blog
My blog created with React, Gatsby & Markdown
Stars: ✭ 29 (-35.56%)
Mutual labels:  gatsbyjs

Watch on GitHub Star on GitHub Tweet!

PRs Welcome

All Contributors

Gatsby + Sanity + Now Starter

✨ Gatsby + Sanity + Now Starter

Create a static web application, consume data from one of the most powerful headless CMS, hit serverless endpoints and deploy it all to a rock-solid CDN. In less than five minutes!

▶️ SEE IT IN ACTION

Table of Contents

What's Included?

Requirements

In order to run this starter without running into any issues you need:

[1] Since this is a monorepo, all dependencies should be installed using Yarn.

[2] The setup script asks to login to Sanity

[3] The setup script asks to login to ZEIT

Getting started

1. Create a new Gatsby project and use this repo URL as the template

npx gatsby new my-awesome-blog https://github.com/iamkevinwolf/gatsby-sanity-now-starter

2. Move into the project directory

cd my-awesome-blog

3. Start the web server for both Gatsby site and Sanity Studio

yarn start

4. Play around with the Studio

Try changing the site settings or adding new posts, click Publish and view your changes in real-time.

If you want a more detailed guide on how to create new schemas, check at your local readme file, this had been replaced in order to show information relevant to your project.

5. Deploy your site

yarn deploy

[1] If you go to this URL just after finish the deploy, you will receive an origin error. This is because you still need to add your production site as a trusted origin to Sanity.

6. Add your production site as a trusted origin to Sanity

  1. Go to Sanity Manage and select your newly created project
  2. Navigate to Settings > API
  3. Click on ADD NEW ORIGIN
  4. Enter your now.sh project url and toggle on the Allow credentials switch
  5. Click on ADD NEW ORIGIN

7. Create a deployment hook to re-deploy the site when content changes

Since static sites don't tend to be fetching any server to get the content, you need to re-build it everytime you change your data in Sanity. This process can be tedious, so you can enable a Deploy Hook on ZEIT that can be called from anywhere to trigger a deploy of your site.

  1. If you haven't already, push your site to GitHub
  2. Go to your ZEIT dashboard and select your project
  3. If you haven't already, link your project with the GitHub repo by clicking the Edit link under the project name
  4. Navigate to the Settings tab on the navigation bar above your project title
  5. Enter the hook name (i.e. Sanity Trigger), select the branch you want to get built when Sanity content changes and click Create Hook
  6. Copy the Deploy Hook url
  7. Go to Sanity Manage and select your project
  8. Navigate to Settings > API
  9. Click on ADD NEW WEBHOOK
  10. Add a name to the webhook (i.e. ZEIT Deployment), paste the ZEIT Deploy Hook url and select the dataset you want to trigger that change
  11. Click ADD NEW WEBHOOK

Contributors

Thanks goes to these wonderful people (emoji key):


Kevin Wolf

💻 🖋 📖 💡 📋 🤔 🚇 📢 📹

Knut Melvær

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

Contributing

If you have any question, suggestion or recommendation, please open an issue about it.

If you decided you want to introduce something to the project, please read contribution guidelines first.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].