This repository has been archived by the owner on Jan 1, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
gatsby-config.js
105 lines (101 loc) · 2.56 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
require('dotenv').config()
const searchData = require('./src/algolia')
const plugins = [
`gatsby-plugin-sass`,
{
resolve: 'gatsby-plugin-nprogress',
options: {
color: '#74c0fc'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/monorepo/markdown/dev`,
name: 'markdown',
ignore: [
'**/nl.md',
'**/es.md',
'**/fr.md',
'**/de.md',
]
}
},
{
resolve: 'gatsby-plugin-mdx',
options: {
extensions: ['.mdx', '.md'],
// Plugins workaround. See: https://github.com/gatsbyjs/gatsby/issues/15486
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 800,
showCaptions: ['title', 'alt'],
markdownCaptions: true,
backgroundColor: `, 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12)`
}
}
],
gatsbyRemarkPlugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 800,
showCaptions: ['title', 'alt'],
backgroundColor: `transparent`,
}
},
{
resolve: 'gatsby-remark-prismjs',
options: {
classPrefix: 'language-',
inlineCodeMarker: null,
aliases: {}
}
},
'gatsby-remark-copy-linked-files',
{
resolve: 'gatsby-remark-autolink-headers',
options: {
elements: ['h2','h3']
}
},
'gatsby-remark-smartypants',
]
}
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-styled-components',
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `FreeSewing`,
short_name: `FreeSewing`,
start_url: `/`,
background_color: `#ffffff`,
theme_color: `#212529`,
display: `standalone`,
icon: `src/images/logo.svg`
}
},
'gatsby-plugin-offline',
'gatsby-plugin-netlify'
]
// Only update the Algolia indices when having the ALGOLIA_UPDATE_KEY set.
// Most likely on deployment to production only
if (process.env.CONTEXT === 'production' && process.env.HEAD === 'main') {
plugins.push({
resolve: 'gatsby-plugin-algolia',
options: {
appId: process.env.GATSBY_ALGOLIA_API_ID,
apiKey: process.env.ALGOLIA_UPDATE_KEY,
queries: searchData(),
chunkSize: 10000
}
})
}
module.exports = { plugins: plugins }