forked from didi/mand-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mfe.blog.config.js
495 lines (488 loc) · 14.1 KB
/
mfe.blog.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
const fs = require('fs')
const path = require('path')
const components = require('../examples/components.json')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
function generateDemos (name) {
const demoPath = resolve(`components/${name}/demo/cases`)
if (fs.existsSync(demoPath)) {
const files = fs.readdirSync(demoPath)
return files.map(file => {
return `${demoPath}/${file}`
})
} else {
return []
}
}
function generateSource (lang = 'zh-CN') {
const menus = []
components.forEach(category => {
const list = category.list
const subMenus = []
list && list.forEach(component => {
subMenus.push({
name: component.path.substr(1),
text: lang === 'en-US'
? `${component.name}`
: `${component.name} <span>${component.text}</span>`,
markdown: lang === 'en-US'
? resolve(`components${component.path}/README.en-US.md`)
: resolve(`components${component.path}/README.md`),
demo: generateDemos(component.path.substr(1))
})
})
menus.push({
name: category.category,
text: category.name,
menu: subMenus
})
})
return menus
}
module.exports = {
title: 'Mand Mobile',
subtitle: '面向金融场景的Vue移动端UI组件库',
subtitleEnUs: 'A mobile UI toolkit, based on Vue.js 2, designed for financial scenarios',
logo: '//manhattan.didistatic.com/static/manhattan/mand/docs/mand-logo-black.svg',
favicon: '//static.galileo.xiaojukeji.com/static/tms/other/mand-mobile-logo.png',
source: [{
name: 'zh-CN',
text: '中文',
src: '/zh-CN/',
menu: [{
name: 'docs',
text: '组件',
src: '/zh-CN/docs/introduce',
menu: [
{
name: 'introduce',
text: 'Mand Mobile',
markdown: resolve('site/docs/introduce.md'),
demo: [resolve('site/theme/default/components/GitContributors.vue')]
},
{
name: 'started',
text: '快速上手',
markdown: resolve('site/docs/started.md'),
},
{
name: 'development',
text: '开发指南',
markdown: resolve('site/docs/development.md'),
},
{
name: 'changelog',
text: '更新日志',
markdown: resolve('CHANGELOG.md'),
},
{
name: 'theme',
text: '主题定制',
markdown: resolve('site/docs/theme.md'),
},
{
name: 'faq',
text: '常见问题',
link: 'https://github.com/didi/mand-mobile/wiki/FAQ---%E4%B8%AD%E6%96%87',
},
// {
// name: 'preview',
// text: '组件概览',
// template: resolve('site/theme/default/Preview.vue'),
// markdown: resolve('README.md'),
// },
{
name: 'migration',
text: '从1.x迁移',
markdown: resolve('site/docs/migration.md'),
},
{
name: 'components',
text: 'Components',
menu: generateSource()
},
],
},
{
name: 'design',
text: '设计',
src: '/zh-CN/design/principle/intuition',
menu: [{
name: 'principle',
text: '原则',
menu: [{
name: 'intuition',
text: '直观简单',
markdown: resolve('site/docs/design/principle/intuition.md'),
}, {
name: 'security',
text: '安全可控',
markdown: resolve('site/docs/design/principle/security.md'),
}, {
name: 'professional',
text: '体贴专业',
markdown: resolve('site/docs/design/principle/professional.md'),
}],
}, {
name: 'vision',
text: '视觉',
menu: [{
name: 'color',
text: '色彩',
markdown: resolve('site/docs/design/vision/color.md'),
}, {
name: 'layout',
text: '布局',
markdown: resolve('site/docs/design/vision/layout.md'),
}, {
name: 'font',
text: '字体',
markdown: resolve('site/docs/design/vision/font.md'),
}],
}, {
name: 'other',
text: '其它',
menu: [{
name: 'resource',
text: '资源',
markdown: resolve('site/docs/design/other/resource.md'),
}],
}]
},
{
name: 'palette',
text: '调色板',
src: 'https://mand-mobile.github.io/palette',
// dot: true
},
{
name: 'mand-mobile-rn',
text: 'Mand Mobile RN',
src: 'https://didi.github.io/mand-mobile-rn',
dot: true
}]
}, {
name: 'en-US',
text: 'English',
src: '/en-US/',
menu: [{
name: 'docs',
text: 'Components',
src: '/en-US/docs/introduce',
menu: [
{
name: 'introduce',
text: 'Mand Mobile',
markdown: resolve('site/docs/introduce.en-US.md'),
demo: [resolve('site/theme/default/components/GitContributors.vue')]
},
{
name: 'started',
text: 'Quick Start',
markdown: resolve('site/docs/started.en-US.md'),
},
{
name: 'development',
text: 'Development Guide',
markdown: resolve('site/docs/development.en-US.md'),
},
{
name: 'changelog',
text: 'Change Log',
markdown: resolve('CHANGELOG.en-US.md'),
},
{
name: 'theme',
text: 'Custom Theme',
markdown: resolve('site/docs/theme.en-US.md'),
},
{
name: 'faq',
text: 'FAQ',
link: 'https://github.com/didi/mand-mobile/wiki/FAQ',
},
// {
// name: 'preview',
// text: 'Component Preview',
// template: resolve('site/theme/default/Preview.vue'),
// markdown: resolve('README.md'),
// },
{
name: 'migration',
text: 'Migration from 1.x',
markdown: resolve('site/docs/migration.en-US.md'),
},
{
name: 'components',
text: 'Components',
menu: generateSource('en-US')
},
],
},
{
name: 'design',
text: 'Design',
src: '/en-US/design/principle/intuition',
menu: [{
name: 'principle',
text: 'Principle',
menu: [{
name: 'intuition',
text: 'Intuitive and simple',
markdown: resolve('site/docs/design/principle/intuition.en-US.md'),
}, {
name: 'security',
text: 'Safe and controllable',
markdown: resolve('site/docs/design/principle/security.en-US.md'),
}, {
name: 'professional',
text: 'Thoughtful and professional',
markdown: resolve('site/docs/design/principle/professional.en-US.md'),
}],
}, {
name: 'vision',
text: 'Vision',
menu: [{
name: 'color',
text: 'Color',
markdown: resolve('site/docs/design/vision/color.en-US.md'),
}, {
name: 'layout',
text: 'Layout',
markdown: resolve('site/docs/design/vision/layout.en-US.md'),
}, {
name: 'font',
text: 'Font',
markdown: resolve('site/docs/design/vision/font.en-US.md'),
}],
}, {
name: 'other',
text: 'Other',
menu: [{
name: 'resource',
text: 'Resource',
markdown: resolve('site/docs/design/other/resource.en-US.md'),
}],
}]
},
{
name: 'palette',
text: 'Palette',
src: 'https://mand-mobile.github.io/palette',
},
{
name: 'mand-mobile-rn',
text: 'Mand Mobile RN',
src: 'https://didi.github.io/mand-mobile-rn',
dot: true
}]
}],
components: generateSource(),
markdownBoundary: {
'<!-- CUTOFF -->': '<div class="md-blog-cut-off"></div>',
'<!-- LOGO -->':
'<img src="//static.galileo.xiaojukeji.com/static/tms/other/mand-mobile-logo.png" width="200">',
},
links: {
'zh-CN': [
{
title: '相关资源',
link: [
{
text: 'Mand Mobile',
src: 'https://github.com/didi/mand-mobile',
},
{
text: 'Mand Mobile RN',
src: 'https://github.com/didi/mand-mobile-rn',
},
{
text: '脚手架模板',
src: 'https://github.com/mand-mobile/mand-mobile-template',
},
{
text: '调色板 <span>- 主题编辑工具</span>',
src: 'https://mand-mobile.github.io/palette'
},
{
text: '国内镜像 🇨🇳',
src: 'https://mand-mobile.gitee.io/docs/index.gitee.html#/zh-CN/home'
},
],
},
{
title: '社区',
link: [
{
text: 'Organization',
src: 'https://github.com/mand-mobile'
},
{
text: '码云',
src: 'https://gitee.com/mand-mobile/mand-mobile'
},
{
text: '官方交流群',
src: 'https://shang.qq.com/wpa/qunwpa?idkey=97670d381924f2d46c53960715577502285952dd12f67e5dc9727f554955a254'
}
],
},
{
title: '帮助',
link: [
{
text: '贡献指南',
src: 'https://github.com/didi/mand-mobile/blob/master/CONTRIBUTING.md',
},
{
text: '问题反馈',
src: 'https://github.com/didi/mand-mobile/issues',
},
{
text: '更新日志',
src: 'https://github.com/didi/mand-mobile/blob/master/CHANGELOG.md',
},
{
text: '常见问题',
src: 'https://github.com/didi/mand-mobile/wiki/FAQ',
},
{
text: '加入我们',
src: 'http://job.didichuxing.com/',
}
]
},
{
title: '更多产品 <a href="http://opensource.didiglobal.com" style="position:relative;top:3px;margin-left:5px;"><img height="16" src="//manhattan.didistatic.com/static/manhattan/mand/docs/didi-logo-white.png"/>',
link: [
{
text: 'Chameleon <span>- 跨端解决方案</span>',
src: 'https://cmljs.org/#/',
},
{
text: 'Cube UI <span>- Vue.js组件库</span>',
src: 'https://didi.github.io/cube-ui',
},
{
text: 'Pile.js <span>- React组件库</span>',
src: 'https://github.com/didi/pile.js',
},
{
text: 'MPX <span>- 增强型小程序框架</span>',
src: 'https://github.com/didi/mpx/',
},
{
text: 'DoraemonKit <span>- iOS开发助手</span>',
src: 'https://github.com/didi/doraemonKit/',
},
{
text: 'VirtualAPK <span>- Android插件化框架</span>',
src: 'https://didi.github.io/virtual-apk.html',
}
],
},
],
'en-US': [
{
title: 'Resources',
link: [
{
text: 'Mand Mobile',
src: 'https://github.com/didi/mand-mobile',
},
{
text: 'Mand Mobile RN',
src: 'https://github.com/didi/mand-mobile-rn',
},
{
text: 'Template',
src: 'https://github.com/mand-mobile/mand-mobile-template',
},
{
text: 'Palette <span>- Theme Editing Tool</span>',
src: 'https://mand-mobile.github.io/palette'
},
{
text: 'China Mirror 🇨🇳',
src: 'https://mand-mobile.gitee.io/docs/index.gitee.html#/en-US/home'
},
],
},
{
title: 'Community',
link: [
{
text: 'Organization',
src: 'https://github.com/mand-mobile'
},
{
text: 'Gitee',
src: 'https://gitee.com/mand-mobile/mand-mobile'
},
{
text: 'Official Communication Group',
src: 'https://shang.qq.com/wpa/qunwpa?idkey=97670d381924f2d46c53960715577502285952dd12f67e5dc9727f554955a254'
}
],
},
{
title: 'Help',
link: [
{
text: 'Contribute Guide',
src: 'https://github.com/didi/mand-mobile/blob/master/CONTRIBUTING.md',
},
{
text: 'Issues',
src: 'https://github.com/didi/mand-mobile/issues',
},
{
text: 'Change Log',
src: 'https://github.com/didi/mand-mobile/blob/master/CHANGELOG.md',
},
{
text: 'FAQ',
src: 'https://github.com/didi/mand-mobile/wiki/FAQ',
},
{
text: 'Join Us',
src: 'http://job.didichuxing.com/',
}
]
},
{
title: 'More Products <a href="http://opensource.didiglobal.com" style="position:relative;top:3px;margin-left:5px;"><img height="16" src="//manhattan.didistatic.com/static/manhattan/mand/docs/didi-logo-white.png"/>',
link: [
{
text: 'Chameleon <span>- Cross-end Framework</span>',
src: 'https://cmljs.org/#/',
},
{
text: 'Cube UI <span>- Vue.js UI Lib</span>',
src: 'https://didi.github.io/cube-ui',
},
{
text: 'Pile.js <span>- React Components</span>',
src: 'https://github.com/didi/pile.js',
},
{
text: 'MPX <span>- Enhanced Miniprogram Framework</span>',
src: 'https://github.com/didi/mpx/',
},
{
text: 'VirtualAPK <span>- Android Plugin Framework</span>',
src: 'https://didi.github.io/virtual-apk.html',
},
{
text: 'DoraemonKit <span>- iOS Development Assistant</span>',
src: 'https://github.com/didi/doraemonKit/',
}
],
},
]
},
copyRight: '2012-2019 Didi Chuxing. All Rights Reserved',
routePrefix: '/mand-mobile',
// staticPrefix: '//manhattan.didistatic.com/static/manhattan/mand-mobile',
}