-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.js
137 lines (132 loc) · 3.59 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
const globImporter = require('node-sass-glob-importer');
require('dotenv').config({
// reference: https://www.gatsbyjs.org/docs/environment-variables/
path: `.env.${process.env.NODE_ENV}`,
});
module.exports = {
siteMetadata: {
title: 'silverstripe-gatsby-theme', // TODO
description: 'A Gatsby Theme for SilverStripe', // TODO
author: 'Stevie Mayhew', // TODO
siteUrl: process.env.GATSBY_SITE_URL,
},
plugins: [
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'silverstripe-gatsby-theme',
short_name: 'silverstripe-gatsby-theme',
start_url: '/',
background_color: '#fff',
theme_color: '#000',
// 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: 'static/images/favicon.png', // This path is relative to the root of the site.
icons: [
{
src: '/favicons/favicon-48x48.png',
sizes: '48x48',
type: 'image/png',
},
{
src: '/favicons/favicon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: '/favicons/favicon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
include_favicon: true, // Include favicon
},
},
{
resolve: 'gatsby-plugin-react-helmet',
},
{
resolve: 'gatsby-plugin-canonical-urls',
options: {
siteUrl: process.env.GATSBY_SITE_URL,
},
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: process.env.GATSBY_SITE_URL,
resolveEnv: () => process.env.NODE_ENV,
env: {
development: {
policy: [{ userAgent: '*', disallow: ['/'] }],
},
production: {
policy: [{ userAgent: '*', allow: '/' }],
},
},
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/static/images`,
},
},
{
resolve: 'gatsby-transformer-sharp',
},
{
resolve: 'gatsby-plugin-sharp',
},
{
resolve: 'gatsby-plugin-react-svg',
},
{
resolve: 'gatsby-plugin-sass',
options: {
importer: globImporter(),
},
},
{
resolve: 'gatsby-plugin-eslint',
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
{
resolve: 'gatsby-plugin-offline',
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: process.env.GATSBY_GOOGLE_TAGMANAGER_ID,
// Include GTM in development.
// Defaults to false meaning GTM will only be loaded in production.
includeInDevelopment: false,
// Specify optional GTM environment details.
// gtmAuth: 'YOUR_GOOGLE_TAGMANAGER_ENVIROMENT_AUTH_STRING',
// gtmPreview: 'YOUR_GOOGLE_TAGMANAGER_ENVIROMENT_PREVIEW_NAME',
// dataLayerName: 'YOUR_DATA_LAYER_NAME',
},
},
{
resolve: 'gatsby-source-silverstripe',
options: {
host: `${process.env.SILVERSTRIPE_URL}`,
},
},
{
resolve: 'gatsby-plugin-antd',
},
{
resolve: 'gatsby-plugin-web-font-loader',
options: {
monotype: {
projectId: 'edeb819d-9c20-4f5a-98e4-7bd532ebc0ba',
loadAllFonts: true,
},
},
},
],
};