-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgatsby-config.js
45 lines (44 loc) · 1.1 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
require("dotenv").config()
module.exports = {
plugins: [
"gatsby-plugin-emotion",
"gatsby-plugin-react-helmet",
"gatsby-plugin-svgr",
{
resolve: "gatsby-plugin-env-variables",
options: {
whitelist: [
"SANITY_PROJECT_ID",
"SANITY_DATASET",
"GOOGLE_MAPS_API_KEY",
],
},
},
{
resolve: "gatsby-source-sanity",
options: {
projectId: process.env.SANITY_PROJECT_ID,
dataset: process.env.SANITY_DATASET,
token: process.env.SANITY_TOKEN,
overlayDrafts:
process.env.NODE_ENV !== "production" &&
process.env.SHOW_DRAFTS !== "false",
watchMode: process.env.NODE_ENV !== "production",
},
},
{
resolve: "gatsby-plugin-web-font-loader",
options: {
google: {
families: ["Roboto:400,400italic,500,700,900"],
},
},
},
process.env.GOOGLE_ANALYTICS_ID && {
resolve: "gatsby-plugin-google-analytics",
options: {
trackingId: process.env.GOOGLE_ANALYTICS_ID,
},
},
].filter(x => x),
}