Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

contentful/gatsby-preview

Repository files navigation

gatsby-preview

Based on https://github.com/contentful-userland/gatsby-contentful-starter

Customized to build from preview and delivery api, controlled via env vars so it can be used with Gatsby Preview and deployed to Netlify.

To pre-fill a space with the needed content, use:

npm run setup

For local development, run:

GATSBY_CONTENTFUL_SPACE_ID={spaceID} \
GATSBY_CONTENTFUL_HOST={preview.contentful.com|cdn.contentful.com} \
GATSBY_CONTENTFUL_ACCESS_TOKEN={deliveryToken|previewToken} \
npm run dev

For deployment, run:

GATSBY_CONTENTFUL_SPACE_ID={spaceID} \
GATSBY_CONTENTFUL_HOST={preview.contentful.com|cdn.contentful.com} \
GATSBY_CONTENTFUL_ACCESS_TOKEN={deliveryToken|previewToken} \
npm run build

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published