Skip to content

Commit

Permalink
added: initial connection to Contentful CMS
Browse files Browse the repository at this point in the history
weird issue around gatsby-source-contentful needing an img saved in media in order to work
gatsbyjs/gatsby#15397
  • Loading branch information
MrT3313 committed Dec 5, 2019
1 parent ccb42f7 commit 270cf2f
Show file tree
Hide file tree
Showing 3 changed files with 347 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// configure options for a Gatsby site, with metadata for project title, description, plugins, etc.

// -- //
require('dotenv').config()

console.log(process.env.CONTENTFUL_SPACE_ID)
console.log(process.env.CONTENTFUL_ACCESS_TOKEN)
module.exports = {
siteMetadata: {
// title: `Gatsby Default Starter`,
Expand Down Expand Up @@ -30,6 +33,15 @@ module.exports = {
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,

{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
// Learn about environment variables: https://gatsby.dev/env-vars
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
},
},


`gatsby-plugin-react-helmet`,
{
Expand Down
Loading

0 comments on commit 270cf2f

Please sign in to comment.