|
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 | + ], |
20 | 23 | },
|
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 | + ], |
23 | 32 | },
|
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 | + ], |
29 | 45 | },
|
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 | +}; |
49 | 50 |
|
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', |
71 | 83 | },
|
72 | 84 | },
|
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'], |
90 | 92 |
|
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: '刷新', |
112 | 126 | },
|
113 | 127 | },
|
| 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, |
114 | 159 | },
|
115 | 160 | },
|
116 | 161 | },
|
117 | 162 | };
|
| 163 | + |
| 164 | +module.exports = { |
| 165 | + siteConfig, |
| 166 | + evergreen: true, |
| 167 | + clearScreen: false, |
| 168 | + theme: '@eggjs/vuepress-theme-egg', |
| 169 | + extraWatchFiles: [require.resolve('./config')], |
| 170 | +}; |
0 commit comments