Skip to content
/ great-start Public template

A starter template for Gatbsy and Netlify CMS web builds by Will McLean

License

Notifications You must be signed in to change notification settings

wills-websites/great-start

Repository files navigation

Great Start

A starter template for Gatbsy and Prismic builds for Public Websites and Supermarket.

Start a site

  1. Create a private repo using this as a template when prompted in the willswebsites organisation
  2. Clone the repo to your local machine
  3. Install dependencies by running npm install inside the project directory
  4. Update project title and description in readme, package.json and gatsby-config.js
  5. Add an initial commit and push to github
  6. Start deving with gatsby develop
  7. Link Netlify site to github repo for deployment

Join the site

  1. Clone the site git clone ...
  2. Install dependencies by running npm install inside the project directory
  3. Create a .env.development file in the root of the repo to hold the any project variables, like api keys etc. (see https://www.gatsbyjs.com/docs/how-to/local-development/environment-variables/)
  4. Start deving with gatsby develop

Deployment

Master branch set to auto deploy to

Prismic

To get prismic working with this template:

  1. Create a new prismic repo and set up a content type (eg. Projects)
  2. Set up previews in your prismic repo settings (https://prismic.io/docs/previews-gatsby)
  3. Add your repo name, api key and content type access token to a .env.development file
  4. Uncomment the prismic plugins in gatsby-config.js
  5. Uncomment the prismic previews setup in the gatsby-ssr.js and gatsby-browser.js files
  6. Uncomment the prismic queries and other related bits in the templates/ProjectListPage.js file
  7. Rename the example projects/ExamplePrismicContentTypeFile.js file to match your content type (eg. {PrismicProject.uid}.js)
  8. Check your linkResolver, queries and templates are all updated with relevant info to you prismic repo content types.

Removing Prismic

If you aren't going to use Prismic then you can remove the following:

  1. Remove the prismic plugins from gatsby-config.js
  2. Remove the prismic previews setup in the gatsby-ssr.js and gatsby-browser.js files
  3. Remove the templates/ProjectListPage.js file
  4. Remove the example projects/ExamplePrismicContentTypeFile.js file
  5. Remove the linkResolver.js file
  6. Uninstall the prismic dependencies npm uninstall gatsby-source-prismic prismic-reactjs gatsby-plugin-prismic-previews

About

A starter template for Gatbsy and Netlify CMS web builds by Will McLean

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •