-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
66 lines (62 loc) · 1.52 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
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`
})
const podcastFeed = require('./podcast-feed')
const siteMetadata = require('./siteMetadata')
const isProd = process.env.NODE_ENV === 'production'
const previewEnabled =
(process.env.GATSBY_IS_PREVIEW || 'false').toLowerCase() === 'true'
module.exports = {
siteMetadata,
plugins: [
'gatsby-plugin-image',
{
resolve: 'gatsby-plugin-styled-components',
options: {
cssProp: true
}
},
{
resolve: 'gatsby-plugin-module-resolver',
options: {
root: './src',
aliases: {
'~': '.'
}
}
},
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-layout',
options: {
component: require.resolve('./src/layout/Layout.tsx')
}
},
{
resolve: 'gatsby-source-sanity',
options: {
projectId: 'iq9kxmf9',
token: process.env.SANITY_TOKEN,
dataset: process.env.USE_STAGING === 'true' ? 'staging' : 'production',
watchMode: !isProd, // watchMode only in dev mode
overlayDrafts: !isProd || previewEnabled // drafts in dev & Gatsby Cloud Preview
}
},
'gatsby-plugin-netlify',
'gatsby-plugin-gatsby-cloud',
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-158652076-1',
head: true
}
},
{
resolve: `gatsby-plugin-facebook-pixel`,
options: {
pixelId: '2307295726222106'
}
},
podcastFeed
]
}