-
Notifications
You must be signed in to change notification settings - Fork 5
/
gatsby-config.js
123 lines (121 loc) · 3.51 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
const {
NODE_ENV,
URL: NETLIFY_SITE_URL = 'https://prideinlondon.org',
DEPLOY_PRIME_URL: NETLIFY_DEPLOY_URL = NETLIFY_SITE_URL,
CONTEXT: NETLIFY_ENV = NODE_ENV,
} = process.env
const isNetlifyProduction = NETLIFY_ENV === 'production'
const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL
const env = NODE_ENV || 'development'
require('dotenv').config({ path: `.env.${env}` })
module.exports = {
siteMetadata: {
siteUrl,
name: 'Pride in London',
legalName: 'London LGBTQ+ Community Pride CIC',
title: 'Pride in London',
description:
'The UK’s biggest, most diverse Pride. A home for every part of London’s LGBTQ+ community',
appleAppId: '1250496471',
phone: '+448443445428',
email: '[email protected]',
streetAddress: 'PO Box 71920',
addressLocality: 'London',
addressRegion: 'London',
postalCode: 'NW2 9QN',
addressCountry: 'UK',
facebook: 'https://www.facebook.com/pg/LondonLGBTPride',
twitter: 'https://twitter.com/PrideInLondon',
instagram: 'http://instagram.com/prideinlondon',
youtube: 'https://www.youtube.com/user/LondonLGBTPride',
linkedin: 'https://www.linkedin.com/company/prideinlondon/',
snapchat: 'http://www.snapchat.com/add/LondonLGBTPride',
},
plugins: [
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: process.env.GATSBY_GTM_ID,
},
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: process.env.GATSBY_GTM_ID2,
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-styled-components',
{
resolve: 'gatsby-plugin-layout',
options: {
component: require.resolve('./src/layout/Layout.js'),
},
},
'gatsby-plugin-typescript',
{
resolve: 'gatsby-source-contentful',
options: {
spaceId: `${process.env.CONTENTFUL_SPACE_ID}`,
accessToken: `${process.env.CONTENTFUL_ACCESS_TOKEN}`,
...(process.env.CONTENTFUL_HOST && {
host: process.env.CONTENTFUL_HOST,
}),
...(process.env.CONTENTFUL_ENV && {
environment: process.env.CONTENTFUL_ENV,
}),
// we need this to ensure full data resolution on nested custom types
// https://github.com/gatsbyjs/gatsby/issues/10592#issuecomment-542919638
forceFullSync: env === 'development',
},
},
{
resolve: 'gatsby-plugin-rollbar',
options: {
accessToken: `${process.env.ROLLBAR_ACCESS_TOKEN}`,
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: 'development',
},
},
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
resolveEnv: () => NETLIFY_ENV,
env: {
production: {
policy: [{ userAgent: '*' }],
},
'branch-deploy': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null,
},
'deploy-preview': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null,
},
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: 'gatsby-plugin-sitemap',
options: {
exclude: ['/blog/', '/blog/*'],
},
},
`gatsby-plugin-remove-serviceworker`,
],
}