-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
113 lines (111 loc) · 3.03 KB
/
Copy pathconfig.js
File metadata and controls
113 lines (111 loc) · 3.03 KB
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
const path = require('path')
const { config } = require('dotenv')
config()
const webpack = require('webpack')
module.exports = {
configureWebpack: (config) => {
return {
plugins: [
new webpack.EnvironmentPlugin({ ...process.env })
]
}
},
title: 'ikaruga.org',
description: 'だぶんをつらねます',
dest: path.resolve(__dirname, '../../dist'),
evergreen: true,
locales: {
'/': { lang: 'ja-JP' },
},
head: [
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c&display=swap' }]
],
themeConfig: {
author: 'ikaruga',
domain: 'https://ikaruga.org',
navbar: {
"GitHub": 'https://github.com/ikaruga777',
"Twitter": "https://twitter.com/UVB_76",
"Flickr": "https://www.flickr.com/photos/uvb_76/",
}
},
plugins: [
[
'@vuepress/blog',
{
directories: [
{
id: 'post',
dirname: '_posts',
path: '/posts/',
layout: 'PostList',
itemLayout: 'Post',
pagination: {
lengthPerPage: 6,
},
}
]
}
],
[
'@vuepress/google-analytics',
{
'ga': 'UA-152792685-1'
}
],
[
'feed', {
canonical_base: 'https://ikaruga.org',
posts_directories: ['/_posts/'],
count: 20,
sort: function(posts) {
return posts.sort(function(a,b){
return new Date(b.date) - new Date(a.date)
})
}
}
],
[
'seo', {
siteTitle: (_, $site) => $site.title,
title: ($page, $site) => $page.title || $site.title,
description: $page => $page.frontmatter.description,
author: (_, $site) => $site.themeConfig.author,
tags: $page => $page.frontmatter.tags,
twitterCard: _ => 'summary',
type: $page => ['articles', 'posts', 'blog'].some(folder => $page.regularPath.startsWith('/' + folder)) ? 'article' : 'website',
url: (_, $site, path) => ($site.themeConfig.domain || '') + path,
image: ($page, $site) => ($page.frontmatter.image && (($site.themeConfig.domain || '') + $page.frontmatter.image)) || ($site.themeConfig.domain || '') + "/icon.jpg",
publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date),
modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
}
],
[
'@vssue/vuepress-plugin-vssue', {
platform: 'github',
// all other options of Vssue are allowed
owner: 'ikaruga777',
repo: 'ikaruga.org',
clientId: process.env.VSSUE_CLIENT_ID,
clientSecret: process.env.VSSUE_CLIENT_SECRET,
admins: ['ikaruga777'],
perPage: 3,
locale: 'ja-JP'
},
],
[
'social-share', {
noGlobalSocialShare: true,
},
],
],
markdown: {
plugins: {
'markdown-it-fontawesome': {
}
},
extendMarkdown: md => {
md.use(require('markdown-it-fontawesome'))
}
}
}