-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgridsome.config.js
110 lines (110 loc) · 2.59 KB
/
gridsome.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
module.exports = {
siteName: 'Gridsome + Shopify 😍',
siteDescription: 'A full-featured Shopify starter kit for Gridsome, including an account page.',
siteUrl: 'https://gridsome-starter-shopify-account.vercel.app',
templates: {
ShopifyProduct: [
{
path: '/product/:handle',
component: './src/templates/Product.vue'
}
],
ShopifyCollection: [
{
path: '/collection/:handle',
component: './src/templates/Collection.vue'
}
],
ShopifyPage: [
{
path: '/:handle',
component: './src/templates/Page.vue'
}
]
},
plugins: [
{
use: 'gridsome-source-shopify',
options: {
storeName: process.env.GRIDSOME_SHOPIFY_STOREFRONT,
storefrontToken: process.env.GRIDSOME_SHOPIFY_STOREFRONT_TOKEN
}
},
{
use: 'gridsome-plugin-flexsearch',
options: {
flexsearch: {
profile: 'match'
},
collections: [
{
typeName: 'ShopifyProduct',
indexName: 'Product',
fields: ['title', 'handle', 'description']
},
{
typeName: 'ShopifyCollection',
indexName: 'Collection',
fields: ['title', 'handle', 'description']
}
],
searchFields: ['title', 'handle', 'tags']
}
},
'gridsome-plugin-purgecss',
{
use: '@gridsome/plugin-critical',
options: {
paths: ['/', '/collections', '/collection/*'],
width: 1300,
height: 900
}
},
{
use: '@gridsome/plugin-sitemap',
options: {
exclude: ['/account'],
config: {
'/product/*': {
changefreq: 'daily',
priority: 0.5
},
'/collection/*': {
changefreq: 'weekly',
priority: 0.5
},
'/collections': {
changefreq: 'monthly',
priority: 0.7
}
}
}
},
{
use: '@gridsome/plugin-google-analytics',
options: {
id: process.env.GRIDSOME_ANALYTICS_ID
}
},
{
use: 'gridsome-plugin-manifest',
options: {
background_color: '#000000',
icon_path: './src/favicon.png',
name: 'Gridsome + Shopify 😍',
short_name: 'Shopify Starter + 🔐',
theme_color: '#000000',
lang: 'en'
}
},
{
use: 'gridsome-plugin-service-worker',
options: {
staleWhileRevalidate: {
cacheName: 'static-resources',
routes: [/\.(?:css)$/]
}
}
}
]
}