-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
63 lines (61 loc) · 1.34 KB
/
index.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
module.exports = (themeConfig, ctx) => {
themeConfig.locales = {
...defaultLocales(),
...themeConfig.locales,
};
let configPluginBlog = {
...defaultConfigPluginBlog(),
...themeConfig.configPluginBlog,
};
return {
plugins: [['@vuepress/plugin-blog', configPluginBlog]],
};
};
function defaultConfigPluginBlog() {
return {
directories: [
{
id: 'post',
dirname: '_posts',
path: '/',
layout: 'Index',
itemLayout: 'Post',
itemPermalink: '/:slug',
},
],
frontmatters: [
{
id: 'tag',
keys: ['tags'],
path: '/tag/',
layout: 'Tags',
scopeLayout: 'Tag',
},
],
};
}
function defaultLocales() {
return {
'default': 'en',
'pt-BR': {
breadcrumb: { home: 'Página Inicial' },
sideBar: { favoritePosts: 'Postagens Populares' },
social: { follow: 'Acesse' },
notFound: {
title: 'Página Não Encontrada!',
home: 'Ir para Página Inicial',
},
article: { author: 'Autor' },
},
'en': {
breadcrumb: { home: 'Home' },
sideBar: { favoritePosts: 'Favorite Posts' },
social: { follow: 'Follow Me' },
notFound: {
title: 'Page Not Found',
home: 'Go to home',
},
article: { author: 'Author' },
},
};
}