Created
April 14, 2020 14:11
-
-
Save vojtechjurasek/ca1106af6af94b099b5428089c866923 to your computer and use it in GitHub Desktop.
gatsby-config.js for Woocommerce and WordPress integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
module.exports = { | |
// ... | |
{ | |
resolve: '@pasdo501/gatsby-source-woocommerce', | |
options: { | |
api: 'your-site.com', | |
https: true, | |
verbose: true, | |
query_string_auth: true, | |
api_keys: { | |
consumer_key: process.env.WOOCOMMERCE_CONSUMER_KEY, | |
consumer_secret: process.env.WOOCOMMERCE_CONSUMER_SECRET, | |
}, | |
fields: ['products'], | |
}, | |
}, | |
{ | |
resolve: 'gatsby-source-wordpress', | |
options: { | |
baseUrl: 'your-site.com', | |
protocol: 'https', | |
hostingWPCOM: false, | |
useACF: true, | |
verboseOutput: true, | |
}, | |
}, | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment