forked from koordinator-sh/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
185 lines (175 loc) · 5.22 KB
/
docusaurus.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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const versions = require('./versions.json');
function getNextVersionName() {
const expectedPrefix = 'v1.';
const lastReleasedVersion = versions[0];
if (!lastReleasedVersion.includes(expectedPrefix)) {
throw new Error(
'this code is only meant to be used during the 2.0 phase.',
);
}
const version = parseInt(lastReleasedVersion.replace(expectedPrefix, ''), 10);
return `${expectedPrefix}${version + 1}`;
}
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Koordinator',
tagline: 'QoS-based scheduling for efficient orchestration of microservices, AI, and big data workloads on Kubernetes',
url: 'https://koordinator.sh',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'koordinator-sh', // Usually your GitHub org/user name.
projectName: 'koordinator.sh', // Usually your repo name.
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
//editUrl: 'https://github.com/koordinator-sh/koordinator.sh/tree/main',
editUrl: function ({
locale,
docPath,
}) {
return `https://github.com/koordinator-sh/koordinator.sh/edit/main/docs/${docPath}`;
},
showLastUpdateAuthor: true,
showLastUpdateTime: true,
includeCurrentVersion: true,
lastVersion: undefined,
onlyIncludeVersions: (() => {
return ['current', ...versions.slice(0, 3)];
})(),
versions: {
current: {
label: `${getNextVersionName()} 🚧`,
},
},
},
blog: {
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/koordinator-sh/koordinator.sh/edit/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-Hans'],
localeConfigs: {
en: {
label: 'English',
},
'zh-Hans': {
label: '简体中文',
},
},
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
announcementBar: {
id: 'start',
content:
'⭐️ If you like Koordinator, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/koordinator-sh/koordinator">GitHub</a>! ⭐️',
},
algolia: { // TODO(FillZpp)
apiKey: '72ec0a3c892141cf32490c676bb66628',
indexName: 'openkruise',
appId: 'FKASWWQYOP',
},
navbar: {
title: 'Koordinator',
logo: {
alt: 'Koordinator',
src: 'img/logo.svg',
},
items: [
{
type: 'docsVersionDropdown',
position: 'right',
},
{to: 'docs', label: 'Documentation', position: 'left'},
{to: '/blog', label: 'Blog', position: 'left'},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/koordinator-sh/koordinator',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
links: [
{
title: 'Documentation',
items: [
{
label: 'Getting Started',
href: 'docs/installation',
},
{
label: 'User Manuals',
href: 'docs/user-manuals/colocation-profile',
},
{
label: 'Architecture',
href: 'docs/architecture/overview',
}
],
},
{
title: 'Community',
items: [
{
label: 'Slack ( #koordinator channel )',
href: 'https://join.slack.com/t/koordinator-sh/shared_invite/zt-1756qoub4-Cn4~esfdlfAPsD7cwO2NzA',
},
{
label: 'DingTalk (GroupID: 33383887)',
href: '.',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/koordinator-sh/koordinator',
},
{
label: 'Blog',
href: 'blog',
},
],
},
],
copyright: `
<br />
<strong>Copyright © ${new Date().getFullYear()} The Koordinator Authors. All rights reserved.</strong>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;