-
Notifications
You must be signed in to change notification settings - Fork 6
/
gridsome.config.js
138 lines (133 loc) · 3.17 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
// 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`
const tailwind = require('tailwindcss')
// const purgecss = require('@fullhuman/postcss-purgecss')
const postcssPlugins = [
tailwind(),
]
// if (process.env.NODE_ENV === 'production') postcssPlugins.push(purgecss())
module.exports = {
siteName: 'BrickSchema',
siteDescription: 'A uniform metadata schema for buildings',
siteUrl: 'https://brickschema.org',
plugins: [
{
use: '@gridsome/source-filesystem',
options: {
path: 'blog/**/*.md',
typeName: 'Post',
refs: {
tags: {
typeName: 'Tag',
route: 'tags/:id',
create: true
}
},
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'tools/**/*.md',
typeName: 'App',
refs: {
categories: {
typeName: 'Category',
route: 'categories/:id',
create: true
}
},
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'usageDetails/**/*.md',
typeName: 'UsageDetail',
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'personas/**/*.md',
typeName: 'Persona'
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'webpages/**/*.md',
typeName: 'Webpage',
refs: {
personas: {
typeName: 'Persona',
route: 'personas/:id'
}
},
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'ontologyPages/**/*.md',
typeName: 'OntologyPage',
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'usageDetails/**/*.md',
typeName: 'UsageDetail',
}
},
{
use: 'gridsome-plugin-rss',
options: {
contentTypeName: 'Post',
feedOptions: {
title: 'BrickSchema',
feed_url: 'https://brickschema.org/rss.xml',
site_url: 'https://brickschema.org/'
},
feedItemOptions: node => ({
title: node.title,
description: node.summary,
url: 'https://brickschema.org' + node.path,
author: 'Shreyas Nagare',
date: node.date
}),
output: {
dir: './static',
name: 'rss.xml'
}
}
},
{
use: '@gridsome/plugin-sitemap',
options: {
cacheTime: 600000, // default
}
},
],
transformers: {
remark: {
externalLinksTarget: '_blank',
externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
anchorClassName: 'icon icon-link',
plugins: [
['remark-attr'],
[ '@gridsome/remark-prismjs', { transformInlineCode: false } ],
['gridsome-plugin-remark-youtube', {width: '85%', align: 'auto'}],
]
}
},
css: {
loaderOptions: {
postcss: {
plugins: postcssPlugins,
},
},
},
}