-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridsome.config.js
91 lines (89 loc) · 2.1 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
const path = require("path");
function addStyleResource(rule) {
rule
.use("style-resource")
.loader("style-resources-loader")
.options({
patterns: [path.resolve(__dirname, "./src/assets/scss/index.scss")]
});
}
module.exports = {
siteName: "Buildings Are Heavy",
chainWebpack(config) {
// Load variables for all vue-files
const types = ["vue-modules", "vue", "normal-modules", "normal"];
types.forEach(type => {
addStyleResource(config.module.rule("scss").oneOf(type));
});
},
plugins: [
{
use: "@gridsome/vue-remark",
options: {
typeName: "Photography",
baseDir: "./photography",
pathPrefix: "/",
template: "./src/templates/PhotographyPost.vue",
refs: {
tags: {
typeName: "PhotographyTag",
create: true
}
}
}
},
{
use: "@gridsome/vue-remark",
options: {
typeName: "Writing",
baseDir: "./writing",
pathPrefix: "/",
template: "./src/templates/WritingPost.vue",
refs: {
tags: {
typeName: "WritingTag",
create: true
}
}
}
},
{
use: "@gridsome/vue-remark",
options: {
typeName: "Portfolio",
baseDir: "./portfolio",
pathPrefix: "/"
}
},
// configure Netlify CMS
{
use: `gridsome-plugin-netlify-cms`,
options: {
publicPath: `/admin`,
modulePath: `src/admin/index.js`
}
},
// fix paths
// {
// use: 'gridsome-plugin-netlify-cms-paths',
// options: {
// contentTypes: ['Portfolio'], // Same as declared above
// coverField: 'image', // Global definition
// },
// },
{
use: "@gridsome/plugin-google-analytics",
options: {
id: "UA-152620234-1"
}
}
],
transformers: {
//Add markdown support to all file-system sources
remark: {
externalLinksTarget: "_blank",
externalLinksRel: ["nofollow", "noopener", "noreferrer"],
anchorClassName: "icon icon-link"
}
}
};