-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridsome.config.js
142 lines (139 loc) · 3.33 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// 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: 'Heather Tovey',
siteUrl: 'https://www.heathertovey.com',
siteDescription: 'A blog about web development and Shopify.',
titleTemplate: '%s - Heather Tovey',
icon: {
favicon: "./src/favicon.png",
touchicon: "./src/favicon.png"
},
metadata: {
twitter: {
site: '@hrtovey',
creator: '@hrtovey'
}
},
plugins: [
'gridsome-plugin-robots',
{
use: '@gridsome/plugin-sitemap',
options: {
exclude: ['/thank-you'],
config: {
'/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: '@noxify/gridsome-plugin-remote-image',
options: {
typeName: 'ShopifyImage',
sourceField: 'originalSrc',
targetField: 'downloadedSrc',
targetPath: './src/assets/remoteImages'
}
},
{
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']
}
},
{
use: "@gridsome/source-filesystem",
options: {
typeName: "Post",
path: "./src/post/**/*.md",
remark: {
plugins: [
'@gridsome/remark-prismjs',
['remark-toc']
],
},
refs: {
// Auto create a collection for all categories
categories: {
typeName: 'Category',
create: true
},
// Auto create a collection for all categories
tags: {
typeName: 'Tag',
create: true
}
}
}
},
{
use: "@gridsome/source-filesystem",
options: {
typeName: "ProductsInfo",
path: "./src/data/**/*.md"
}
},
{
use: "gridsome-plugin-feed",
options: {
contentTypes: ["Post"],
feedOptions: {
title: "HeatherTovey.com Blog Feed",
description: "Articles about Shopify theme development.",
link: "https://www.heathertovey.com/",
language: "en"
},
rss: {
enabled: true,
output: "/rss.xml"
},
maxItems: 25,
nodeToFeedItem: node => ({
title: node.title,
date: new Date(node.date),
content: node.excerpt
})
}
},
],
templates: {
Post: "/blog/:slug",
Category: "/blog/category/:title",
Tag: "/blog/tag/:title",
ShopifyProduct: [
{
path: '/product/:handle',
component: './src/templates/Product.vue'
}
]
},
transformers: {
}
}