diff --git a/gatsby-config.js b/gatsby-config.js index 5ac61f2accd..840a9af6d86 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,5 +1,9 @@ const path = require('path'); +require('dotenv').config({ + path: `.env.${process.env.NODE_ENV}`, +}); + module.exports = { siteMetadata: { title: 'Carbon Design System', @@ -73,13 +77,13 @@ module.exports = { { resolve: `gatsby-source-airtable`, options: { - apiKey: `AIRTABLE_CONTRIBUTION_API_KEY`, + apiKey: process.env.AIRTABLE_CONTRIBUTION_API_KEY, concurrency: 5, // default, see using markdown and attachments for more information tables: [ { - baseId: `AIRTABLE_CONTRIBUTION_BASEID`, - tableName: `AIRTABLE_CONTRIBUTION_TABLENAME`, - tableView: `AIRTABLE_CONTRIBUTION_TABLEVIEW`, + baseId: process.env.AIRTABLE_CONTRIBUTION_BASEID, + tableName: process.env.AIRTABLE_CONTRIBUTION_TABLENAME, + tableView: process.env.AIRTABLE_CONTRIBUTION_TABLEVIEW, }, ], },