-
Notifications
You must be signed in to change notification settings - Fork 2
/
gatsby-config.js
65 lines (62 loc) · 1.74 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
const path = require("path")
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 = {
plugins: [
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// The property ID; the tracking code won't be generated without it
trackingId: "UA-156294066-1",
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: false,
// Setting this parameter is optional
anonymize: false,
// Setting this parameter is also optional
respectDNT: false,
// Avoids sending pageview hits from custom paths
exclude: [],
// Delays sending pageview hits on route update (in milliseconds)
pageTransitionDelay: 0,
},
},
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography`,
},
},
{
resolve: `gatsby-source-contentful`,
options: {
...contentfulConfig,
// downloadLocal: true,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: path.join(__dirname, `src`, `images`),
},
},
{
resolve: `gatsby-plugin-layout`,
options: {
component: require.resolve(`./src/components/transition`),
},
},
],
}