-
Notifications
You must be signed in to change notification settings - Fork 2
/
gatsby-config.js
60 lines (59 loc) · 1.46 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
const urlJoin = require('url-join');
const config = require('./SITE_CONFIG');
const { join } = require('path');
/** @type { import("gatsby").GatsbyConfig } */
module.exports = {
pathPrefix: config.pathPrefix === '' ? '/' : config.pathPrefix,
siteMetadata: {
siteUrl: urlJoin(config.siteUrl, config.pathPrefix)
},
plugins: [
'gatsby-plugin-react-helmet',
'gatsby-plugin-typescript',
{
resolve: 'gatsby-plugin-plausible',
options: {
domain: config.domain
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'assets',
path: join(process.cwd(), 'static'),
ignore: ['.gitkeep']
}
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
sitemap: `${config.siteUrl}/sitemap/sitemap-index.xml`,
policy: [{ userAgent: '*', allow: '/' }]
}
},
{
resolve: 'gatsby-plugin-canonical-urls',
options: {
siteUrl: config.siteUrl,
stripQueryString: true
}
},
{
resolve: 'gatsby-plugin-sitemap',
options: {}
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: config.siteTitle,
short_name: config.siteTitleShort,
description: config.siteDescription,
start_url: '/',
background_color: config.backgroundColor,
theme_color: config.themeColor,
display: 'minimal-ui',
icon: './static/favicon.svg'
}
}
]
};