Skip to content

Instantly share code, notes, and snippets.

@vojtechjurasek
Created April 14, 2020 14:11
Show Gist options
  • Select an option

  • Save vojtechjurasek/ca1106af6af94b099b5428089c866923 to your computer and use it in GitHub Desktop.

Select an option

Save vojtechjurasek/ca1106af6af94b099b5428089c866923 to your computer and use it in GitHub Desktop.

Revisions

  1. vojtechjurasek created this gist Apr 14, 2020.
    30 changes: 30 additions & 0 deletions gatsby-config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    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,
    },
    },
    // ...
    }