This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gridsome.config.js
122 lines (119 loc) · 3 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
const path = require('path')
const addStyleResource = (rule) => {
rule
.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/sass/*.sass')
]
})
}
module.exports = {
siteName: "Grammer blog",
siteDescription: "Sebuah situs blog yang dimiliki oleh Satya Wikananda, dimana blog ini akan membahas seputar pemrograman atau teknologi khususnya di bidang website, selain itu blog ini akan membahas hal-hal lainnya juga diluar pembahasan tadi",
siteUrl: 'https://grammer-blog.vercel.app',
chainWebpack(config){
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach((type) => {
addStyleResource(config.module.rule('scss').oneOf(type))
})
},
templates: {
Tag: '/tag/:title'
},
siteName: 'Grammer Blog',
plugins: [
{
use: '@gridsome/source-filesystem',
options: {
typeName: "BlogContent",
path: 'posts/*.md',
remark: {
plugins: [
'@gridsome/remark-prismjs'
]
},
refs: {
tags: {
typeName: 'Tag',
create: true
},
}
}
},
{
use: 'gridsome-plugin-rss',
options: {
contentTypeName: 'BlogContent',
feedOptions: {
title: 'Grammer Blog',
feed_url: 'https://grammer-blog.vercel.app/rss.xml',
site_url: 'https://grammer-blog.vercel.app'
},
feedItemOptions: (node) => ({
title: node.title,
description: node.description,
path: `https://grammer-blog.vercel.app/${node.path}`,
author: node.author,
date: node.date,
timeToRead: node.timeToRead
}),
output: {
dir: './static',
name: 'rss.xml'
}
}
},
{
use: 'gridsome-plugin-nprogress',
options: {
color: '#E64A19',
showSpinner: true
}
},
{
use: 'gridsome-plugin-pwa',
options: {
title: 'Grammer blog',
startUrl: '/',
display: 'standalone',
statusBarStyle: 'default',
manifestPath: 'manifest.json',
serviceWorkerPath: 'service-worker.js',
shortName: 'Grammer blog',
themeColor: '#E64A19',
backgroundColor: '#f1f2f2',
icon: './static/favicon.png',
cachedFileTypes: 'js,json,css,png,jpg,jpeg,svg',
}
},
{
use: '@gridsome/plugin-sitemap',
options: {
cacheTime: 600000,
exclude: [],
config: {
'/posts/*': {
changefreq: 'weekly',
priority: 0.5
},
'/tag/*': {
changefreq: 'weekly',
priority: 0.5
},
'/about': {
changefreq: 'monthly',
priority: 0.6
}
}
}
}
],
transformers: {
remark: {
externalLinksTarget: '_blank',
externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
}
}
}