-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgridsome.config.js
139 lines (137 loc) · 3.7 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
// 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: process.env.SITE_NAME || 'Gridsome Geek Blog',
siteDescription:
process.env.SITE_DESCRIPTION ||
'Gridsome Geek Blog covers Technologies, Apps, Games, Tips and Tricks, How to, Linux, Windows, Blogging, Programming etc.',
siteUrl: process.env.GRIDSOME_BASE_URL || 'https://xqsit94.github.com',
icon: {
favicon: {
src: process.env.SITE_FAVICON_PATH || './static/images/favicon.png',
sizes: [16, 32, 96],
},
},
plugins: [
{
use: 'gridsome-plugin-robots-txt',
},
{
use: 'gridsome-plugin-windicss',
},
{
use: '@gridsome/vue-remark',
options: {
typeName: 'Documentation', // Required
baseDir: './docs', // Where .md files are located
pathPrefix: '/', // Add route prefix. Optional
template: './src/templates/Documentation.vue', // Optional
plugins: [
[
'gridsome-plugin-remark-shiki',
{ theme: 'css-variables', skipInline: true },
],
],
},
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'blog/**/*.md',
typeName: 'Post',
refs: {
tags: {
typeName: 'Tag',
create: true,
},
categories: {
typeName: 'Category',
create: true,
},
},
},
},
{
use: 'gridsome-plugin-rss',
options: {
contentTypeName: 'Post',
feedOptions: {
title:
process.env.SITE_TITLE ||
'Geek Blog | Technology Guide, Tips, HowTo, Coding etc.',
feed_url: process.env.GRIDSOME_BASE_URL
? `${process.env.GRIDSOME_BASE_URL}/rss.xml`
: 'https://xqsit94.github.com/rss.xml',
site_url:
process.env.GRIDSOME_BASE_URL || 'https://xqsit94.github.com/',
},
feedItemOptions: (node) => ({
title: node.title,
description: node.summary,
url: process.env.GRIDSOME_BASE_URL
? process.env.GRIDSOME_BASE_URL + node.path
: 'https://xqsit94.github.com' + node.path,
author: process.env.SITE_AUTHOR || 'Manikandan (xqsit94)',
date: node.date,
}),
output: {
dir: './static',
name: 'rss.xml',
},
},
},
{
use: '@gridsome/plugin-sitemap',
options: {
cacheTime: 600000, // default
},
},
{
use: 'gridsome-plugin-recommender',
options: {
enabled: true,
typeName: 'Post',
referenceTypeName: 'Post',
field: 'title',
referenceField: 'title',
relatedFieldName: 'related',
referenceRelatedFieldName: 'related',
caseSensitive: false,
minScore: 0.01,
maxScore: 1,
minRelations: 3,
maxRelations: 3,
fillWithRandom: false,
debug: false,
},
},
{
use: 'gridsome-plugin-gtag',
options: {
config: {
id: process.env.GOOGLE_ANALYTICS_ID,
},
},
},
],
templates: {
Tag: '/tag/:id',
Category: '/category/:id',
},
transformers: {
remark: {
plugins: [
[
'gridsome-plugin-remark-shiki',
{ theme: 'css-variables', skipInline: true },
],
['remark-attr'],
],
externalLinksTarget: '_blank',
externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
anchorClassName: 'icon icon-link',
},
},
}