Mirror of github.com/kingomarnajjar/gatsby-starter-netlify-cms
Find a file
2018-01-19 15:12:01 -08:00
src Remove static keyword from handleScriptLoad 2018-01-19 15:12:01 -08:00
static migrate to cms plugin, revert jsx extensions 2018-01-16 11:04:11 -05:00
.gitignore Integrate CMS build system and create initial preview templates 2017-12-06 22:12:52 -08:00
gatsby-config.js migrate to cms plugin, revert jsx extensions 2018-01-16 11:04:11 -05:00
gatsby-node.js migrate to cms plugin, revert jsx extensions 2018-01-16 11:04:11 -05:00
LICENSE first commit 2017-10-18 17:43:20 -04:00
netlify.toml Use netlify.toml to specify build command 2017-12-06 22:52:43 -08:00
package-lock.json remove GraphQL dependency because it is already included in GatsbyJS 2017-12-24 11:20:57 +01:00
package.json migrate to cms plugin, revert jsx extensions 2018-01-16 11:04:11 -05:00
README.md Fix another Netlify link 2018-01-17 03:00:31 +03:00
yarn.lock migrate to cms plugin, revert jsx extensions 2018-01-16 11:04:11 -05:00

Gatsby + Netlify CMS Starter

This repo contains an example business website that is built with Gatsby, and Netlify CMS: Demo Link.

It follows the JAMstack architecture by using Git as a single source of truth, and Netlify for continuous deployment, and CDN distribution.

Prerequisites

  • Node (I recommend using v8.2.0 or higher)
  • Gatsby CLI

Netlify CMS can run in any frontend web environment, but the quickest way to try it out is by running it on a pre-configured starter site with Netlify. The example here is the Kaldi coffee company template (adapted from One Click Hugo CMS). Use the button below to build and deploy your own copy of the repository:

Deploy to Netlify

After clicking that button, youll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template. Next, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete. Next, youll need to set up Netlifys Identity service to authorize users to log in to the CMS.

Access Locally

$ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git
$ cd [REPO_NAME]
$ yarn
$ npm run develop

To test the CMS locally, you'll need run a production build of the site:

$ npm run build
$ npm run serve

Getting Started (Without Netlify)

$ gatsby new [SITE_DIRECTORY_NAME] https://github.com/AustinGreen/gatsby-starter-netlify-cms/
$ cd [SITE_DIRECTORY_NAME]
$ npm run build
$ npm run serve

Setting up the CMS

Follow the Netlify CMS Quick Start Guide to set up authentication, and hosting.

Debugging

Windows users might encounter node-gyp errors when trying to npm install. To resolve, make sure that you have both Python 2.7 and the Visual C++ build environment installed.

npm config set python python2.7
npm install --global --production windows-build-tools

Full details here