-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatsby-config.js
131 lines (124 loc) · 4.21 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
const path = require('path')
const {
NODE_ENV,
URL: NETLIFY_SITE_URL = 'https://chirofoam-cms.netlify.app',
DEPLOY_PRIME_URL: NETLIFY_DEPLOY_URL = NETLIFY_SITE_URL,
CONTEXT: NETLIFY_ENV = NODE_ENV
} = process.env;
const isNetlifyProduction = NETLIFY_ENV === 'production';
const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL;
module.exports = {
siteMetadata: {
title: `Chirofoam™ Memory Foam Mattress`,
description: `The Chirofoam™ Memory Foam Mattress is designed to get you a more effective and efficient sleep, and helps to relieve back pain. Made in Toronto, ON.`,
siteUrl: `https://chirofoam-cms.netlify.app`,
author: `@chirofoam`
},
proxy: {
prefix: "/.netlify/functions",
url: "http://localhost:9000",
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-layout`,
`gatsby-plugin-offline`,
`gatsby-plugin-sitemap`,
{
resolve: 'gatsby-plugin-robots-txt',
options: {
resolveEnv: () => NETLIFY_ENV,
env: {
production: {
policy: [{ userAgent: '*' }]
},
'branch-deploy': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null
},
'deploy-preview': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null
}
}
}
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Chirofoam`,
short_name: `Chirofoam`,
start_url: `/`,
background_color: `#243b6b`,
theme_color: `#243b6b`,
display: `standalone`,
icon: `src/images/favicon.png` // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-source-shopify`,
options: {
// The domain name of your Shopify shop. This is required.
// Example: 'gatsby-source-shopify-test-shop' if your Shopify address is
// 'gatsby-source-shopify-test-shop.myshopify.com'.
shopName: 'chirofoam-dev.myshopify.com',
// An API access token to your Shopify shop. This is required.
// You can generate an access token in the "Manage private apps" section
// of your shop's Apps settings. In the Storefront API section, be sure
// to select "Allow this app to access your storefront data using the
// Storefront API".
// See: https://help.shopify.com/api/custom-storefronts/storefront-api/getting-started#authentication
accessToken: 'c48261d5691fcaf3fd0c8232ebd54a3a',
// Set the API version you want to use. For a list of available API versions,
// see: https://help.shopify.com/en/api/storefront-api/reference/queryroot
// Defaults to 2019-07
apiVersion: "2020-01",
// Set verbose to true to display a verbose output on `npm run develop`
// or `npm run build`. This prints which nodes are being fetched and how
// much time was required to fetch and process the data.
// Defaults to true.
verbose: true,
// Number of records to fetch on each request when building the cache
// at startup. If your application encounters timeout errors during
// startup, try decreasing this number.
paginationSize: 250,
// List of collections you want to fetch.
// Possible values are: 'shop' and 'content'.
// Defaults to ['shop', 'content'].
includeCollections: ["shop", "content"]
}
},
{
resolve: 'gatsby-plugin-root-import',
options: {
'~': path.join(__dirname, 'src/')
}
},
{
resolve: "gatsby-source-wordpress",
options: {
baseUrl: "http://test.nationalmattress.ca/chirofoam",
protocol: "http",
hostingWPCOM: false,
useACF: true,
verboseOutput:false,
excludedRoutes: [
"**/settings",
"**/wp/v2/users/me",
"**/wp/v2/themes",
],
acfOptionPageIds: [],
},
},
],
}