-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
106 lines (103 loc) · 2.78 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
100
101
102
103
104
105
106
console.log(
'Asking for the following file for keys and tokens: ',
`.env.${process.env.NODE_ENV}`
)
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
})
console.log('Contentful space ID: ', process.env.GATSBY_CONTENTFUL_SPACE_ID)
console.log(
'Contentful space Token: ',
process.env.GATSBY_CONTENTFUL_ACCESS_TOKEN
)
console.log('Contentful environment: ', process.env.GATSBY_CONTENTFUL_ENV)
const contentfulConfig = {
spaceId: process.env.GATSBY_CONTENTFUL_SPACE_ID,
accessToken: process.env.GATSBY_CONTENTFUL_ACCESS_TOKEN,
environment: process.env.GATSBY_CONTENTFUL_ENV || 'development',
}
module.exports = {
siteMetadata: {
title: `Leire Polo Martin`,
description: `Leire Polo Martin profesional profile`,
author: `Leire Polo Martin`,
siteUrl: 'https://www.google.com',
},
plugins: [
{
resolve: `gatsby-plugin-prefetch-google-fonts`,
options: {
fonts: [
{
family: `Lato`,
variants: [`400`, `900`],
subsets: [`latin`],
},
{
family: `Merriweather`,
variants: [`900`],
subsets: [`latin`],
},
],
},
},
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'Leire Polo Martin',
short_name: 'Leire',
start_url: '/',
// TODO: Get correct colours and icon
background_color: '#6b37bf',
theme_color: '#6b37bf',
// Enables "Add to Homescreen" prompt and disables browser UI (including back button)
// see https://developers.google.com/web/fundamentals/web-app-manifest/#display
display: 'standalone',
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
},
},
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-emotion`,
options: {
// Accepts all options defined by `babel-plugin-emotion` plugin.
},
},
{
resolve: `gatsby-source-contentful`,
options: contentfulConfig,
},
`gatsby-plugin-sitemap`,
{
resolve: 'gatsby-plugin-robots-txt',
options: {
policy: [{ userAgent: '*', allow: '/' }],
},
},
{
resolve: `gatsby-plugin-hotjar`,
options: {
id: 41390,
sv: 6,
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GA_TOKEN,
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: true,
},
},
],
}