-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
125 lines (124 loc) · 3.2 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
const url = 'https://principles-cookbook.netlify.app';
const title = 'the principles and feelings cookbook';
const description = "the principles and feelings cookbook";
module.exports = {
siteMetadata: {
siteUrl: url,
title: title,
description: description,
author: 'Zhijiang Li'
},
trailingSlash: 'never',
plugins: [
'gatsby-plugin-netlify-cms',
'gatsby-plugin-emotion',
'gatsby-plugin-gatsby-cloud',
'gatsby-plugin-image',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: title,
short_name: `cookbook`,
description: description,
start_url: `/`,
background_color: `#f0ead6`,
theme_color: `#f0ead6`,
display: `standalone`,
icon: 'src/images/master-512.png',
icon_options: {
purpose: `any maskable`
}
},
},
{
resolve: 'gatsby-transformer-remark',
options: {
excerpt_separator: `<!-- end -->`,
plugins: [
{
resolve: "gatsby-remark-external-links",
options: {
target: "_blank",
rel: "noopener noreferrer"
}
}
]
}
},
'gatsby-plugin-mdx',
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/theme/typography`
}
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/src/images/`
},
__key: 'images'
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'principles',
path: `${__dirname}/writing/principles/`
},
__key: 'principles'
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'techniques',
path: `${__dirname}/writing/techniques/`
},
__key: 'techniques'
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'recipes',
path: `${__dirname}/writing/recipes/`
},
__key: 'recipes'
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'about',
path: `${__dirname}/writing/about/`
},
__key: 'about'
},
'gatsby-plugin-offline', // after manifest plugin
{
resolve: 'gatsby-plugin-no-javascript-utils',
options: {
noScript: false, // kept for better routing purposes
noSourcemaps: true,
removeGeneratorTag: true,
removeReactHelmetAttrs: false, // 'true' makes meta tags finnicky as there can be duplicates
noInlineStyles: true, // doesn't make big difference since the site uses css-in-js
removeGatsbyAnnouncer: false, // doesn't seem to work when true
}
},
{
resolve: 'gatsby-plugin-netlify',
options: {
allPageHeaders: [
'Referrer-Policy: strict-origin-when-cross-origin',
'X-Content-Type-Options: nosniff',
'X-Frame-Options: DENY',
'X-XSS-Protection: 1; mode=block',
"Content-Security-Policy: frame-ancestors 'none';",
]
}
}
]
};