forked from phodal/ledge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscully.ledge.config.js
111 lines (103 loc) · 2.81 KB
/
scully.ledge.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
const { Sitemap } = require('@gammastream/scully-plugin-sitemap');
const { registerPlugin } = require('@scullyio/scully');
const defaultPostRenderers = [Sitemap];
const sitemapOptions = {
urlPrefix: 'https://devops.phodal.com/',
sitemapFilename: 'sitemap.xml',
changeFreq: 'hourly',
priority: [
'1.0',
'0.9',
'0.8',
'0.7',
'0.6',
'0.5',
'0.4',
'0.3',
'0.2',
'0.1',
'0.0',
],
ignoredRoutes: ['/404'],
};
function casePlugin(route, config) {
return Promise.resolve([
{ route: '/case-study/meituan' },
{ route: '/case-study/cloudbase' },
{ route: '/case-study/ledge' },
{ route: '/case-study/tw-banks' },
{ route: '/case-study/daocloud' },
{ route: '/case-study/cmb' },
{ route: '/case-study/hp' },
{ route: '/case-study/etsy' },
{ route: '/case-study/china-bank' },
{ route: '/case-study/xuecheng' },
{ route: '/case-study/nonghang' },
{ route: '/case-study/huawei' },
{ route: '/case-study/baidu' },
{ route: '/case-study/tencent' },
{ route: '/case-study/bocloud' },
{ route: '/case-study/alibaba' },
{ route: '/case-study/atlassian' },
{ route: '/case-study/zhengcaiyun' },
{ route: '/case-study/dasouche' },
{ route: '/case-study/xiaomi' },
{ route: '/case-study/weibo' },
{ route: '/case-study/youku' },
{ route: '/case-study/bilibili' },
]);
}
function solutionPlugin(route, config) {
return Promise.resolve([
{ route: '/solution/coding' },
{ route: '/solution/cloudbase' },
{ route: '/solution/worktile' },
{ route: '/solution/firim' },
{ route: '/solution/zentao' },
]);
}
function thinkTankPlugin(route, config) {
return Promise.resolve([
{ route: '/think-tank/qa' },
{ route: '/think-tank/mobile-android' },
{ route: '/think-tank/frontend' },
]);
}
function checklistsPlugin(route, config) {
return Promise.resolve([
{ route: '/checklists/0' },
{ route: '/checklists/1' },
{ route: '/checklists/2' },
{ route: '/checklists/3' },
{ route: '/checklists/4' },
{ route: '/checklists/5' },
{ route: '/checklists/6' },
{ route: '/checklists/7' },
]);
}
const validator = async (conf) => [];
registerPlugin('router', 'case', casePlugin, validator);
registerPlugin('router', 'solution', solutionPlugin, validator);
registerPlugin('router', 'tank', thinkTankPlugin, validator);
registerPlugin('router', 'checklists', checklistsPlugin, validator);
exports.config = {
projectRoot: './src',
projectName: 'ledge',
outDir: './dist/static',
sitemapOptions,
defaultPostRenderers,
routes: {
'/case-study/:case': {
type: 'case',
},
'/solution/:solution': {
type: 'solution',
},
'/think-tank/:tank': {
type: 'tank',
},
'/checklists/:selectedIndex': {
type: 'checklists',
},
},
};