1.0.0 • Published 3 years ago

gathercontent-gatsby-demo v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

'GatherContent & Gatsby'

gatsby-starter-gathercontent

Getting Started

In this starter you'll use an example project from GatherContent with Gatsby.

If you're interested in how data is sourced from GatherContent you can view the documentation in the GatherContent source plugin 👍

Prerequisites

  • You have a GatherContent account.

  • You have a GatherContent API Key.

  • You have a demo project in GatherContent named "Course records (headless CMS example)".

All accounts should have this demo project. If you can't find this project on your account then our support team can help.

Configuration

To build the site we need to source the data from GatherContent.

Firstly, create a .env.development file and populate it with the prerequisite data.

# .env.development
GATSBY_GC_EMAIL=<email>
GATSBY_GC_API_KEY=<your_api_key>
GATSBY_GC_PROJECT_ID=<project_id> // you can find this in the project settings

Build & view the demo

npm install
npm run develop

The demo should now be running at http://localhost:8000!

You can start editing the code in src or update the content in your GatherContent project.

Live edits

You can manually rebuild the project by re-running npm run develop or you can run npm run refresh!

By using the refresh command, you won't need to manually restart your development server saving you time 👍

Query guide

The GatherContent source plugin includes a guide on sourcing data from GatherContent.

It is recommended that you read the guide to better understand the schema.

More reading