-
Notifications
You must be signed in to change notification settings - Fork 22
/
gridsome.config.js
77 lines (72 loc) · 2.06 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
// 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 path = require('path');
function addStyleResource(rule) {
rule.use('style-resource').loader('style-resources-loader').options({
patterns: [
path.resolve(__dirname, './src/sass/_tokens.scss'),
path.resolve(__dirname,
'./node_modules/@lkmx/flare-legacy/src/components/**/*.scss'),
path.resolve(__dirname,
'./node_modules/@lkmx/flare-legacy/src/functions/**/*.scss'),
path.resolve(__dirname,
'./node_modules/@lkmx/flare-legacy/src/guides/**/*.scss'),
path.resolve(__dirname,
'./node_modules/@lkmx/flare-legacy/src/structures/**/*.scss'),
],
});
}
module.exports = {
siteName: 'Secret Network',
siteUrl: 'https://scrt.network',
plugins: [
{
use: '@gridsome/vue-remark',
options: {
typeName: 'Content',
baseDir: './content',
path: '/',
template: './src/templates/Content.vue',
remark: {
// remark options
},
},
},
{
use: '@gridsome/source-ghost',
options: {
typeName: 'Ghost',
baseUrl: 'https://blog-admin.scrt.network',
contentKey: '74d989aa8008b1d8e3c9464b65',
}
},
{
use: '@gridsome/plugin-google-analytics',
options: {
id: 'UA-173950488-3'
}
}
],
templates: {
GhostPost: '/blog/:slug'
},
transformers: {
remark: {
externalLinksTarget: '_blank',
externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
anchorClassName: 'icon icon-link',
plugins: [
'gridsome-plugin-remark-prismjs-all',
]
},
},
chainWebpack(config) {
const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
types.forEach(type => {
addStyleResource(config.module.rule('scss').oneOf(type));
});
config.resolve.alias.set('@images', '@/../content/img')
},
};