This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
130 lines (129 loc) · 3.66 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
const siteMetadata = require('./site-metadata.json')
module.exports = {
pathPrefix: '/',
siteMetadata: {
siteMetadata,
siteUrl: `https://service.tuanducdesign.com`,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-source-data`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 1200,
withWebp: true,
quality: 80,
},
}],
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`
}
},
{
resolve: `gatsby-plugin-sass`,
options: {}
},
{
resolve: `gatsby-remark-page-creator`,
options: {}
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Tuan Duc Design`,
short_name: `TD Service`,
start_url: `/`,
background_color: `#fff`,
theme_color: `#fe2c55`,
display: `standalone`,
icon: 'static/images/58111AA6-D0D9-4C10-BC6C-068FDAC2CE6D_4_5005_c.jpeg',
cache_busting_mode: 'none',
},
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'GTM-PJL9SWW',
defaultDataLayer: {
platform: 'gatsby'
},
enableWebVitalsTracking: true,
},
},
{
resolve: 'gatsby-plugin-offline',
options: {
workboxConfig: {
runtimeCaching: [{
// Use cacheFirst since these don't need to be revalidated (same RegExp
// and same reason as above)
urlPattern: /(\.js$|\.css$|[^:]static\/)/,
handler: 'CacheFirst',
},
{
// page-data.json files, static query results and app-data.json
// are not content hashed
urlPattern: /^https?:.*\/page-data\/.*\.json/,
handler: 'StaleWhileRevalidate',
},
{
// Add runtime caching of various other page resources
urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
handler: 'StaleWhileRevalidate',
},
{
// Google Fonts CSS (doesn't end in .css so we need to specify it)
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
handler: 'StaleWhileRevalidate',
},
],
},
},
},
'gatsby-plugin-no-sourcemaps',
'gatsby-plugin-optimize-svgs',
'gatsby-plugin-robots-txt',
{
resolve: 'gatsby-plugin-preconnect',
options: {
domains: ['https://pagead2.googlesyndication.com', 'https://www.googletagmanager.com', 'https://connect.facebook.net', 'https://www.facebook.com', 'https://static.xx.fbcdn.net', 'https://www.google-analytics.com', 'https://www.google.com'],
}
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://service.tuanducdesign.com`,
},
},
{
resolve: `gatsby-plugin-nprogress`,
options: {
// Setting a color is optional.
color: `tomato`,
// Disable the loading spinner.
showSpinner: false,
},
},
'gatsby-plugin-sitemap',
{
resolve: `@stackbit/gatsby-plugin-menus`,
options: {
sourceUrlPath: `fields.url`,
pageContextProperty: `menus`,
}
}
]
};