Skip to content

Commit 1ef372f

Browse files
authored
chore: config theme (#8)
1 parent fdb8006 commit 1ef372f

File tree

14 files changed

+255
-116
lines changed

14 files changed

+255
-116
lines changed

config.js

Lines changed: 157 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,170 @@
1-
module.exports = {
2-
clearScreen: false,
3-
siteConfig: {
4-
title: 'Egg',
5-
host: '0.0.0.0',
6-
description: 'Egg 文档',
7-
evergreen: true,
8-
locales: {
9-
'/': {
10-
lang: 'en-US',
11-
title: 'Egg',
12-
description:
13-
'Born to build better enterprise frameworks and apps with Node.js & Koa',
14-
},
15-
'/zh/': {
16-
lang: 'zh-CN',
17-
title: 'Egg',
18-
description: '为企业级框架和应用而生',
19-
},
1+
const head = [
2+
[
3+
'link',
4+
{
5+
rel: 'icon',
6+
href: '/favicon.png',
7+
type: 'image/x-icon',
8+
},
9+
],
10+
];
11+
12+
const foot = {
13+
friendList: [
14+
{
15+
title: 'Github',
16+
list: [
17+
{
18+
name: 'Organization',
19+
url: 'https://github.com/eggjs',
20+
},
21+
{ name: 'Example', url: 'https://github.com/eggjs/examples' },
22+
],
2023
},
21-
markdown: {
22-
lineNumbers: true,
24+
{
25+
title: 'Links',
26+
list: [
27+
{ name: 'Ant Design', url: 'https://ant.design' },
28+
{ name: 'Ant Motion', url: 'http://motion.ant.design/' },
29+
{ name: 'Antv', url: 'https://antv.alipay.com/' },
30+
{ name: 'Umi.js', url: 'https://umijs.org/' },
31+
],
2332
},
24-
devServer: {
25-
overlay: {
26-
// warnings: true,
27-
errors: true,
28-
},
33+
{
34+
title: 'Community',
35+
list: [
36+
{
37+
name: 'FAQ',
38+
url: 'https://eggjs.org/zh-cn/faq.html',
39+
},
40+
{
41+
name: 'Node.js Column',
42+
url: 'https://www.yuque.com/egg/nodejs',
43+
},
44+
],
2945
},
30-
themeConfig: {
31-
locales: {
32-
'/': {
33-
selectText: 'Languages',
34-
label: 'English',
35-
editLinkText: 'Edit this page on GitHub',
36-
serviceWorker: {
37-
updatePopup: {
38-
message: 'New content is available.',
39-
buttonText: 'Refresh',
40-
},
41-
},
42-
nav: [
43-
{ text: 'Home', link: '/' },
44-
{ text: 'QuickStart', link: '/quickstart/' },
45-
{ text: 'Guide', link: '/guide/' },
46-
],
47-
sidebar: {
48-
'/quickstart/': [['./', 'QuickStart'], 'egg'],
46+
{ title: 'Egg.js Dingtalk', qrcode: '/egg/qrcode_dingtalk.png' },
47+
],
48+
copyright: [{ text: 'Copyright © 2019 Egg.js' }],
49+
};
4950

50-
'/guide/': [
51-
['./', 'Description'],
52-
// 'directory',
53-
// 'middleware',
54-
// 'controller',
55-
// 'router',
56-
// 'service',
57-
// 'application',
58-
// 'context',
59-
// 'config',
60-
// 'logger',
61-
// 'cookie',
62-
// 'session',
63-
// 'helper',
64-
// 'httpclient',
65-
// 'error_handler',
66-
// 'lifecycle',
67-
// 'plugin',
68-
// 'upload',
69-
// 'i18n',
70-
],
51+
const siteConfig = {
52+
head,
53+
locales: {
54+
'/': {
55+
lang: 'en-US',
56+
title: 'Egg',
57+
description:
58+
'Born to build better enterprise frameworks and apps with Node.js & Koa',
59+
},
60+
'/zh/': {
61+
lang: 'zh-CN',
62+
title: 'Egg',
63+
description: '为企业级框架和应用而生',
64+
},
65+
},
66+
themeConfig: {
67+
logo: '/logo.svg',
68+
repo: 'https://github.com/eggjs/eggjs.github.io',
69+
docsBranch: 'docs',
70+
docsDir: 'docs',
71+
editLinks: true,
72+
73+
locales: {
74+
'/': {
75+
label: 'English',
76+
selectText: 'Languages',
77+
editLinks: true,
78+
editLinkText: 'Edit this page on GitHub',
79+
serviceWorker: {
80+
updatePopup: {
81+
message: 'New content is available.',
82+
buttonText: 'Refresh',
7183
},
7284
},
73-
'/zh/': {
74-
selectText: '选择语言',
75-
label: '简体中文',
76-
editLinkText: '在 GitHub 上编辑此页',
77-
serviceWorker: {
78-
updatePopup: {
79-
message: '发现新内容可用.',
80-
buttonText: '刷新',
81-
},
82-
},
83-
nav: [
84-
{ text: '首页', link: '/zh/' },
85-
{ text: '快速开始', link: '/zh/quickstart/' },
86-
{ text: '教程', link: '/zh/guide/' },
87-
],
88-
sidebar: {
89-
'/zh/quickstart/': [['./', '快速开始'], 'egg'],
85+
nav: [
86+
{ text: 'Home', link: '/' },
87+
{ text: 'QuickStart', link: '/quickstart/' },
88+
{ text: 'Guide', link: '/guide/' },
89+
],
90+
sidebar: {
91+
'/quickstart/': [['./', 'QuickStart'], 'egg'],
9092

91-
'/zh/guide/': [
92-
['./', '概述'],
93-
'directory',
94-
'middleware',
95-
'controller',
96-
'router',
97-
'service',
98-
'application',
99-
'context',
100-
'config',
101-
'logger',
102-
'cookie',
103-
'session',
104-
'helper',
105-
'httpclient',
106-
'error_handler',
107-
'lifecycle',
108-
'plugin',
109-
'upload',
110-
'i18n',
111-
],
93+
'/guide/': [
94+
['./', 'Description'],
95+
// 'directory',
96+
// 'middleware',
97+
// 'controller',
98+
// 'router',
99+
// 'service',
100+
// 'application',
101+
// 'context',
102+
// 'config',
103+
// 'logger',
104+
// 'cookie',
105+
// 'session',
106+
// 'helper',
107+
// 'httpclient',
108+
// 'error_handler',
109+
// 'lifecycle',
110+
// 'plugin',
111+
// 'upload',
112+
// 'i18n',
113+
],
114+
},
115+
foot,
116+
},
117+
'/zh/': {
118+
label: '简体中文',
119+
selectText: '选择语言',
120+
editLinks: true,
121+
editLinkText: '在 GitHub 上编辑此页',
122+
serviceWorker: {
123+
updatePopup: {
124+
message: '发现新内容可用.',
125+
buttonText: '刷新',
112126
},
113127
},
128+
nav: [
129+
{ text: '首页', link: '/zh/' },
130+
{ text: '快速开始', link: '/zh/quickstart/' },
131+
{ text: '教程', link: '/zh/guide/' },
132+
],
133+
sidebar: {
134+
'/zh/quickstart/': [['./', '快速开始'], 'egg'],
135+
136+
'/zh/guide/': [
137+
['./', '概述'],
138+
'directory',
139+
'middleware',
140+
'controller',
141+
'router',
142+
'service',
143+
'application',
144+
'context',
145+
'config',
146+
'logger',
147+
'cookie',
148+
'session',
149+
'helper',
150+
'httpclient',
151+
'error_handler',
152+
'lifecycle',
153+
'plugin',
154+
'upload',
155+
'i18n',
156+
],
157+
},
158+
foot,
114159
},
115160
},
116161
},
117162
};
163+
164+
module.exports = {
165+
siteConfig,
166+
evergreen: true,
167+
clearScreen: false,
168+
theme: '@eggjs/vuepress-theme-egg',
169+
extraWatchFiles: [require.resolve('./config')],
170+
};
9.04 KB
Loading

docs/.vuepress/public/egg/banner.png

52.6 KB
Loading

docs/.vuepress/public/egg/icon-1.png

14.1 KB
Loading

docs/.vuepress/public/egg/icon-2.png

12.5 KB
Loading

docs/.vuepress/public/egg/icon-3.png

12.1 KB
Loading

docs/.vuepress/public/egg/icon-4.png

13.7 KB
Loading

docs/.vuepress/public/egg/qrcode.png

7.6 KB
Loading
28.8 KB
Loading
5.25 KB
Loading

docs/.vuepress/public/favicon.png

1.65 KB
Loading

docs/.vuepress/public/logo.svg

Lines changed: 60 additions & 0 deletions
Loading

docs/README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
---
2+
toc: false
23
home: true
3-
heroImage: /icon.svg
4-
heroText: EggJs
4+
heroText: Egg.js
5+
banner: /egg/banner.png
56
tagline: Born to build better enterprise frameworks and apps with Node.js & Koa
67
actionText: QuickStart →
7-
actionLink: /zh/guide/
8+
actionLink: /guide/
89
features:
9-
- title: Egg
10-
details: Egg Detail
11-
footer: MIT Licensed
10+
- title: 完善的生态
11+
details: 基于开源生态,专为泛蚂蚁生态定制,一分钟接入后端服务中间件,支持多种部署环境。
12+
icon: /egg/icon-3.png
13+
- title: 高效自然的研发体验
14+
details: 渐进式开发,学习曲线平滑,提供一站式开发套件,为研发全流程保驾护航。
15+
icon: /egg/icon-4.png
16+
- title: 高质量、可信赖
17+
details: 高质量,完备的测试,内置集团安全策略,双十一等线上大规模顶级流量压力考验。
18+
icon: /egg/icon-2.png
19+
- title: 灵活、高扩展性
20+
details: 约定优于配置,高度灵活的定制性,业界领先的插件机制和上层业务框架机制。
21+
icon: /egg/icon-1.png
22+
whosusing:
23+
icon: /img_chair/whosusing.png
24+
# footer: MIT Licensed
1225
---

0 commit comments

Comments
 (0)