-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
125 lines (120 loc) · 3.62 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
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.com/docs/gatsby-config/
*/
const path = require('path');
const postCssPlugins = require('./postcss-config.js');
const maxImageWidth = 672;
const website = require('./config/website');
module.exports = {
flags: {
FUNCTIONS: true,
},
siteMetadata: {
siteLanguage: website.siteLanguage,
siteTitle: website.siteTitle,
siteUrl: website.siteUrl,
contactEmailAddress: website.contactEmailAddress,
facebookPage: `https://www.facebook.com/${website.facebookPage}`,
facebookPageName: website.facebookPage,
githubPage: website.githubPage,
linkedinProfile: website.linkedinProfile,
telegramUsername: website.telegramUsername,
twitterUserId: website.twitterUserId,
twitterUsername: website.twitterUsername,
wireUsername: website.wireUsername,
},
plugins: [
{
resolve: 'gatsby-plugin-sass',
options: {
postCssPlugins: [...postCssPlugins],
sassOptions: {
precision: 4,
},
},
},
{
resolve: 'gatsby-plugin-gatsby-cloud',
options: {
headers: {
'/': [
'Permissions-Policy: accelerometer=(), autoplay=(), camera=(), document-domain=(), encrypted-media=(), fullscreen=(), gyroscope=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), geolocation=()',
'Strict-Transport-Security: max-age=31536000; includeSubDomains; preload',
'X-Robots-Tag: index',
],
},
mergeSecurityHeaders: true,
mergeLinkHeaders: true,
mergeCachingHeaders: true,
transformHeaders: (headers) => headers,
generateMatchPathRewrites: true,
},
},
'gatsby-plugin-image',
{
resolve: 'gatsby-plugin-sharp',
options: {
defaults: {
placeholder: 'tracedSVG',
// temporarily removing avif due to Chrome issue
// formats: ['auto', 'webp', 'avif'],
formats: ['auto', 'webp'],
quality: 100,
// avifOptions: { lossless: true, quality: 100, speed: 0 },
jpgOptions: { quality: 100, progressive: true },
pngOptions: { quality: 100, compressionSpeed: 1 },
webpOptions: { quality: 100 },
tracedSVGOptions: {
color: '#5cc8ff',
background: '#fff275',
},
},
defaultQuality: 100,
stripMetadata: false,
useMozJpeg: true,
},
},
'gatsby-transformer-sharp',
{
resolve: 'gatsby-remark-images',
options: {
linkImagesToOriginal: false,
maxWidth: maxImageWidth,
showCaptions: true,
},
},
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'blog',
path: `${__dirname}/content/blog`,
},
},
{
resolve: 'gatsby-plugin-mdx',
options: {
defaultLayouts: {
blog: path.resolve('./src/templates/blog-post.jsx'),
default: path.resolve('./src/templates/blog-post.jsx'),
},
extensions: ['.mdx', '.md'],
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
linkImagesToOriginal: false,
maxWidth: maxImageWidth,
showCaptions: ['title'],
withWebp: { quality: 100 },
tracedSVG: { color: '#5cc8ff', background: '#fff275' },
},
},
],
gatsbyRemarkPlugins: [],
},
},
],
};