-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.js
170 lines (164 loc) · 3.91 KB
/
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
const head = [
[
'link',
{
rel: 'icon',
href: '/favicon.png',
type: 'image/x-icon',
},
],
];
const foot = {
friendList: [
{
title: 'Github',
list: [
{
name: 'Organization',
url: 'https://github.com/eggjs',
},
{ name: 'Example', url: 'https://github.com/eggjs/examples' },
],
},
{
title: 'Links',
list: [
{ name: 'Ant Design', url: 'https://ant.design' },
{ name: 'Ant Motion', url: 'http://motion.ant.design/' },
{ name: 'Antv', url: 'https://antv.alipay.com/' },
{ name: 'Umi.js', url: 'https://umijs.org/' },
],
},
{
title: 'Community',
list: [
{
name: 'FAQ',
url: 'https://eggjs.org/zh-cn/faq.html',
},
{
name: 'Node.js Column',
url: 'https://www.yuque.com/egg/nodejs',
},
],
},
{ title: 'Egg.js Dingtalk', qrcode: '/img_egg/qrcode_dingtalk.png' },
],
copyright: [{ text: 'Copyright © 2019 Egg.js' }],
};
const siteConfig = {
head,
locales: {
'/': {
lang: 'en-US',
title: 'Egg',
description:
'Born to build better enterprise frameworks and apps with Node.js & Koa',
},
'/zh/': {
lang: 'zh-CN',
title: 'Egg',
description: '为企业级框架和应用而生',
},
},
themeConfig: {
logo: '/logo.svg',
repo: 'https://github.com/eggjs/eggjs.github.io',
docsBranch: 'docs',
docsDir: 'docs',
editLinks: true,
locales: {
'/': {
label: 'English',
selectText: 'Languages',
editLinks: true,
editLinkText: 'Edit this page on GitHub',
serviceWorker: {
updatePopup: {
message: 'New content is available.',
buttonText: 'Refresh',
},
},
nav: [
{ text: 'Home', link: '/' },
{ text: 'QuickStart', link: '/quickstart/' },
{ text: 'Guide', link: '/guide/' },
],
sidebar: {
'/quickstart/': [['./', 'QuickStart'], 'egg'],
'/guide/': [
['./', 'Description'],
// 'directory',
// 'middleware',
// 'controller',
// 'router',
// 'service',
// 'application',
// 'context',
// 'config',
// 'logger',
// 'cookie',
// 'session',
// 'helper',
// 'httpclient',
// 'error_handler',
// 'lifecycle',
// 'plugin',
// 'upload',
// 'i18n',
],
},
foot,
},
'/zh/': {
label: '简体中文',
selectText: '选择语言',
editLinks: true,
editLinkText: '在 GitHub 上编辑此页',
serviceWorker: {
updatePopup: {
message: '发现新内容可用.',
buttonText: '刷新',
},
},
nav: [
{ text: '首页', link: '/zh/' },
{ text: '快速开始', link: '/zh/quickstart/' },
{ text: '教程', link: '/zh/guide/' },
],
sidebar: {
'/zh/quickstart/': [['./', '快速开始'], 'egg'],
'/zh/guide/': [
['./', '概述'],
'directory',
'middleware',
'controller',
'router',
'service',
'application',
'context',
'config',
'logger',
'cookie',
'session',
'helper',
'httpclient',
'error_handler',
'lifecycle',
'plugin',
'upload',
'i18n',
],
},
foot,
},
},
},
};
module.exports = {
siteConfig,
evergreen: true,
clearScreen: false,
theme: '@eggjs/vuepress-theme-egg',
extraWatchFiles: [require.resolve('./config')],
};