Skip to content

Instantly share code, notes, and snippets.

@cwlsn
Created October 10, 2018 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwlsn/a1fddc69de5e668a23e7f6fa09741080 to your computer and use it in GitHub Desktop.
Save cwlsn/a1fddc69de5e668a23e7f6fa09741080 to your computer and use it in GitHub Desktop.
Basic Contentful Source Gatsby Config
const dotenv = require("dotenv");
if (process.env.ENVIRONMENT !== "production") {
dotenv.config();
}
const { spaceId, accessToken } = process.env;
module.exports = {
plugins: [
{
resolve: "gatsby-source-contentful",
options: {
spaceId,
accessToken
}
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment