forked from apache/linkis-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
331 lines (329 loc) · 11.3 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
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
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
(module.exports = {
// omit unrelated docusaurus options
title: 'Apache Linkis',
tagline: 'Apache Linkis',
url: 'https://linkis.apache.org',
baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'Apache Linkis', // Usually your GitHub org/user name.
projectName: 'Apache Linkis', // Usually your repo name.
i18n: {
defaultLocale: "en",
locales: ["en", "zh-CN"],
localeConfigs: {
en: {
label: "English",
direction: 'ltr',
},
'zh-CN': {
label: "简体中文",
direction: 'ltr',
},
},
},
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarCollapsible: true,
editLocalizedFiles: true,
// Please change this to your repo.
editUrl: 'https://github.com/apache/incubator-linkis-website/edit/dev/',
versions: {
current: {
//label: 'Next v1.0.3 (WIP)',
path: '1.0.3',
//banner: 'none',
},
'1.0.2': {
//label: 'v1.0.2',
path: 'latest',
//banner: 'unmaintained',
}
}
},
blog: {
// showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/apache/incubator-linkis-website/edit/dev/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
(
{
// algolia: {
// apiKey: 'xxx',
// indexName: 'apache_linkis',
// },
colorMode: {
defaultMode: 'light',
disableSwitch: true
},
// announcementBar: {
// id: 'announcementBar-2', // Increment on change
// content: `⭐️ If you like Apache Linkis , give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/apache/incubator-linkis">GitHub</a>`,
// backgroundColor: "#BBDFFF",
// },
navbar: {
title: 'Apache EventMesh (Incubating)',
title: 'Apache Linkis(Incubating)',
logo: {
alt: 'Apache Linkis Logo',
src: 'img/logo.png',
},
items: [
{
to: '/',
position: 'left',
label: 'Home',
activeBaseRegex: `^/$`,
},
{
to: '/faq/main',
position: 'left',
label: 'FAQ',
activeBaseRegex: `/faq/`,
},
{
to: '/download/main',
position: 'left',
label: 'Download',
activeBaseRegex: `/download/`,
},
{
to: '/community/how-to-subscribe',
label: 'Community',
position: 'left',
activeBaseRegex: `/community/`,
},
{
to: '/team',
label: 'Team',
position: 'left',
activeBaseRegex: `/team`,
},
{
to: '/user',
label: 'Users',
position: 'left',
activeBaseRegex: `/user`,
},
{
label: 'ASF',
position: 'left',
items: [
{
label: "Foundation",
to: "https://www.apache.org/",
},
{
label: "License",
to: "https://www.apache.org/licenses/",
},
{
label: "Events",
to: "https://www.apache.org/events/current-event",
},
{
label: "Security",
to: "https://www.apache.org/security/",
},
{
label: "Sponsorship",
to: "https://www.apache.org/foundation/sponsorship.html",
},
{
label: "Thanks",
to: "https://www.apache.org/foundation/thanks.html",
},
],
},
{
position: 'right',
label: 'Doc',
// to: "/docs/user_guide/overview",
items: [
{
label: "Next-1.0.3 (WIP)",
to: "/docs/1.0.3/introduction",
},
{
label: "1.0.2",
to: "/docs/latest/introduction",
},
{
label: "All versions",
to: "/versions/",
},
],
},
{
href: 'https://github.com/apache/incubator-linkis',
label: 'GitHub',
position: 'right',
},
{
type: "localeDropdown",
position: "right",
},
],
},
footer: {
style: 'light',
links: [
{
title: 'Linkis',
items: [
{
label: 'Document',
href: '/docs/latest/introduction',
},
{
label: 'FAQ',
href: '/faq/main',
},
{
label: 'Releases',
href: 'https://github.com/apache/incubator-linkis/releases',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/apache/incubator-linkis',
},
{
label: 'Issue Tracker',
href: 'https://github.com/apache/incubator-linkis/issues',
},
{
label: 'Pull Requests',
href: 'https://github.com/apache/incubator-linkis/pulls',
},
],
},
{
title: 'Subscribe Mailing List',
items: [
{
label: 'How to Subscribe',
to: '/community/how-to-subscribe',
},
{
label: 'Subscribe Mail',
href: 'mailto:[email protected]',
},
{
label: 'Mail Archive',
href: 'https://lists.apache.org/[email protected]',
},
],
},
// {
// title: 'Apache Software Foundation',
// items: [
//
// {
// label: 'Events',
// href: 'https://www.apache.org/events/current-event',
// },
// {
// label: 'Thanks',
// href: 'http://www.apache.org/foundation/thanks.html',
// },
// {
// label: 'License',
// href: 'https://www.apache.org/licenses/',
// },
// {
// label: 'Security',
// href: 'https://www.apache.org/security/',
// },
// {
// label: 'Sponsorship',
// href: 'https://www.apache.org/foundation/sponsorship.html',
// },
// {
// label: 'Foundation',
// href: 'https://www.apache.org/',
// }
// ],
// },
],
copyright: `<div><img style="height:50px" alt="Apache Software Foundation" src="/img/incubator-logo.svg" /><p style="color: #999999; padding: 0 20px 30px;font-weight:400;text-align:left">Apache Linkis is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p></p>
<p style="padding: 0 20px 30px;color: #999999;font-weight: 400;"> Copyright © ${new Date().getFullYear()} The Apache Software Foundation. Licensed under the Apache License, Version 2.0. Apache Linkis, Apache Incubator, Apache, the Apache feather logo, the Apache Linkis logo and the Apache Incubator project logo are trademarks of The Apache Software Foundation.</p>
<div>`,
},
prism: {
theme: require('prism-react-renderer/themes/dracula'),
darkTheme: darkCodeTheme,
},
}),
plugins: [
'docusaurus-plugin-less',
[
'@docusaurus/plugin-content-docs',
{
id: 'community',
path: 'community',
routeBasePath: 'community',
editUrl: ({locale, versionDocsDirPath, docPath}) => {
if (locale !== 'en') {
return `https://github.com/apache/incubator-linkis-website/edit/dev/i18n/${locale}/${docPath}`;
}
return `https://github.com/apache/incubator-linkis-website/edit/dev/${versionDocsDirPath}/${docPath}`;
},
sidebarPath: require.resolve('./sidebarsCommunity.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'download',
path: 'download',
routeBasePath: 'download',
editUrl: ({locale, versionDocsDirPath, docPath}) => {
if (locale !== 'en') {
return `https://github.com/apache/incubator-linkis-website/edit/dev/i18n/${locale}/${docPath}`;
}
return `https://github.com/apache/incubator-linkis-website/edit/dev/${versionDocsDirPath}/${docPath}`;
},
sidebarPath: require.resolve('./sidebarsCommunity.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'faq',
path: 'faq',
routeBasePath: 'faq',
editUrl: ({locale, versionDocsDirPath, docPath}) => {
if (locale !== 'en') {
return `https://github.com/apache/incubator-linkis-website/edit/dev/i18n/${locale}/${docPath}`;
}
return `https://github.com/apache/incubator-linkis-website/edit/dev/${versionDocsDirPath}/${docPath}`;
},
sidebarPath: require.resolve('./sidebarsCommunity.js'),
},
],
]
});