-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
42 lines (39 loc) · 1.08 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
let contentfulConfig
// Check if we can load contentful config from the json file
try {
contentfulConfig = require("./.contentful")
} catch (_) {}
// Overwrite with env variables if available
contentfulConfig = {
spaceId: process.env.CONTENTFUL_SPACE_ID || contentfulConfig.spaceId,
accessToken:
process.env.CONTENTFUL_DELIVERY_TOKEN || contentfulConfig.accessToken,
}
module.exports = {
siteMetadata: {
title: `Hannes' Blog`,
description: `My blog bringing you the best content!`,
author: `@gatsbyjs`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-contentful`,
options: {
...contentfulConfig,
// downloadLocal: true,
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// The property ID; the tracking code won't be generated without it
trackingId: "UA-141515779-1",
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: false
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`
],
}