This repository has been archived by the owner on Mar 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
99 lines (91 loc) · 2.3 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
let contentfulConfig
try {
// Load the Contentful config from the .contentful.json
contentfulConfig = require('./.contentful') // eslint-disable-line global-require
} catch (_) { console.info('using env vars') }
// Overwrite the Contentful config with environment variables if they exist
contentfulConfig = {
spaceId: process.env.CONTENTFUL_SPACE_ID || contentfulConfig.spaceId,
accessToken: process.env.CONTENTFUL_DELIVERY_TOKEN || contentfulConfig.accessToken,
}
// process.env.GATSBY_CONTENTFUL_OFFLINE = true
const { spaceId, accessToken } = contentfulConfig
if (!spaceId || !accessToken) {
throw new Error(
'Contentful spaceId and the delivery token need to be provided.'
)
}
module.exports = {
pathPrefix: '/',
siteMetadata: {
siteUrl: 'https://www.gulfcorpusa.com',
},
plugins: [
{
resolve: 'gatsby-plugin-layout',
options: {
component: require.resolve('./src/layouts/'),
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-133288229-1',
respectDNT: true,
},
},
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-webpack-bundle-analyzer',
options: {
openAnalyzer: false,
// production: true
},
},
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-favicon',
options: {
logo: './src/favicon.png',
// WebApp Manifest Configuration
appName: 'Gulf Corp', // Inferred with your package.json
appDescription: 'Real Estate Development & Construction',
developerName: 'Zach Hardesty',
developerURL: 'https://zachhardesty.com',
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
windows: false,
},
},
},
'gatsby-plugin-offline',
{
resolve: 'gatsby-plugin-styled-components',
options: {
pure: process.env.NODE_ENV === 'production',
fileName: process.env.NODE_ENV !== 'production',
displayName: process.env.NODE_ENV !== 'production',
},
},
{
resolve: 'gatsby-source-contentful',
options: contentfulConfig,
},
'gatsby-plugin-netlify',
],
}