-
Notifications
You must be signed in to change notification settings - Fork 15
/
gridsome.config.js
108 lines (106 loc) · 2.86 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
// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config
// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`
module.exports = {
siteName: 'Gridsome Shopify Starter',
siteUrl: 'https://gridsome-shopify.netlify.app/',
siteDescription: 'PWA Headless ecommerce Gridsome Shopify starter',
titleTemplate: '%s - Gridsome + Shopify',
icon: {
favicon: "./src/favicon.png",
touchicon: "./src/favicon.png"
},
plugins: [
'gridsome-plugin-robots',
'gridsome-plugin-tailwindcss',
{
use: 'gridsome-plugin-pwa',
options: {
title: 'Gridsome Shopify Starter',
description: 'PWA Headless ecommerce Gridsome Shopify starter',// Optional
startUrl: '/',
display: 'standalone',
gcm_sender_id: undefined,
statusBarStyle: 'default',
manifestPath: 'manifest.json',
disableServiceWorker: true,
serviceWorkerPath: 'service-worker.js',
cachedFileTypes: 'js,json,css,html,png,jpg,jpeg,svg',
shortName: 'Gridsome Shopify',
themeColor: '#000000',
lang: "en-US",
backgroundColor: '#000000',
icon: './src/favicon.png', // must be provided like 'src/favicon.png'
msTileImage: 'Gridsome Shopify',
msTileColor: '#000000'
}
},
{
use: '@gridsome/plugin-sitemap',
options: {
exclude: ['/exclude-me'],
config: {
'/collections/*': {
changefreq: 'daily',
priority: 0.5
},
'/product/*': {
changefreq: 'daily',
priority: 0.5
}
}
}
},
{
use: 'gridsome-source-shopify',
options: {
storeName: process.env.GRIDSOME_SHOPIFY_STOREFRONT,
storefrontToken: process.env.GRIDSOME_SHOPIFY_STOREFRONT_TOKEN
}
},
{
use: '@gridsome/plugin-google-analytics',
options: {
id: ''
}
},
{
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']
}
}
],
templates: {
ShopifyProduct: [
{
path: '/product/:handle',
component: './src/templates/Product.vue'
}
],
ShopifyCollection: [
{
path: '/collection/:handle',
component: './src/templates/Collection.vue'
}
]
},
transformers: {
},
}