forked from apache/seatunnel-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
346 lines (339 loc) · 15.4 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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const versions = require("./versions.json");
const st_web_versions = require("./seatunnel_web_versions.json");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Apache SeaTunnel",
tagline: "Dinosaurs are cool",
url: "https://seatunnel.apache.org",
baseUrl: "/",
onBrokenLinks: "ignore",
onBrokenMarkdownLinks: "ignore",
favicon: "image/favicon.ico",
organizationName: "Apache SeaTunnel",
projectName: "Apache SeaTunnel",
i18n: {
defaultLocale: "en",
locales: ["en", "zh-CN"],
localeConfigs: {
en: {
label: "English",
direction: "ltr",
},
"zh-CN": {
label: "简体中文",
direction: "ltr",
},
},
},
presets: [
[
"classic",
{
docs: {
path: "docs",
routeBasePath: "docs",
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsible: true,
editLocalizedFiles: true,
// Please change this to your repo.
editUrl:
"https://github.com/apache/incubator-seatunnel-website/edit/main/",
versions: {
current: {
path: "",
},
[versions[0]]: {
path: versions[0],
},
},
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/apache/incubator-seatunnel-website/edit/main/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
themeConfig: {
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
announcementBar: {
id: "announcementBar", // Increment on change
content: `🤔 Have queries regarding Apache SeaTunnel, Join Slack channel to discuss them join <a target="_blank" rel="noopener noreferrer" href="https://s.apache.org/seatunnel-slack">#SeaTunnel</a> channel! 🌟`,
backgroundColor: "rgb(70, 125, 175, 0.8)",
isCloseable: false,
},
hideOnScroll: false, // Whether to hide the sidebar on scroll
colorMode: {
defaultMode: "light",
disableSwitch: true,
},
navbar: {
title: "Apache SeaTunnel",
logo: {
alt: "Apache SeaTunnel Logo",
src: "image/logo.png",
},
items: [
{
to: "/",
position: "right",
label: "Home",
activeBaseRegex: `^/$`,
},
{
position: "right",
label: "Document",
items: [
...versions.slice(0, versions.length - 2).map((version) => ({
label: version,
to:
version >= "2.3.0"
? `docs/${version}/about`
: `docs/${version}/intro/about`,
})),
...versions
.slice(versions.length - 2, versions.length)
.map((version) => ({
label: version === "1.x" ? "1.x(Not Apache Release)" : version,
to: `docs/${version}/introduction`,
})),
{
label: "Next",
to: "/docs/about",
},
{
label: "All versions",
to: "/versions/",
},
],
},
{
to: "/download",
position: "right",
label: "Download",
activeBaseRegex: `/download`,
},
{
label: "Community",
position: "right",
to: "/community/contribution_guide/contribute",
},
{
to: "/blog",
label: "Blog",
position: "right",
activeBaseRegex: `/blog`,
},
{
to: "/user_cases",
label: "UserCases",
position: "right",
activeBaseRegex: `/user_cases`,
},
{
to: "/team",
label: "Team",
position: "right",
activeBaseRegex: `/team`,
},
{
to: "/user",
label: "Users",
position: "right",
activeBaseRegex: `/user/`,
},
{
label: "ASF",
position: "right",
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: "Sponsorship",
to: "https://www.apache.org/foundation/sponsorship.html",
},
{
label: "Thanks",
to: "https://www.apache.org/foundation/thanks.html",
},
{
label: "Privacy",
to: "https://apache.org/foundation/policies/privacy.html",
},
],
},
{
href: "https://github.com/apache/incubator-seatunnel",
label: "GitHub",
position: "right",
},
{
to: "/security",
label: "Security",
position: "right",
activeBaseRegex: `/security`,
},
{
type: "localeDropdown",
position: "right",
},
],
},
footer: {
style: "light",
links: [
{
title: "SeaTunnel",
items: [
{
label: "FAQ",
href: "/docs/faq",
},
{
label: "Releases",
href: "https://github.com/apache/incubator-seatunnel/releases",
},
],
},
{
title: "Community",
items: [
{
label: "GitHub",
href: "https://github.com/apache/incubator-seatunnel",
},
{
label: "Issue Tracker",
href: "https://github.com/apache/incubator-seatunnel/issues",
},
{
label: "Pull Requests",
href: "https://github.com/apache/incubator-seatunnel/pulls",
},
],
},
{
title: "Subscribe Mailing List",
items: [
{
label: "How to Subscribe",
to: "/community/contribution_guide/subscribe",
},
{
label: "Subscribe Mail",
href: "mailto:[email protected]",
},
{
label: "Mail Archive",
href: "https://lists.apache.org/[email protected]",
},
],
},
],
copyright: `
<div style="margin-top: 20px;background: #f4f8fa">
<img style="height:50px;margin: 30px 0 10px;" alt="Apache Software Foundation" src="/image/asf_logo_wide.svg" />
<div style="border-top: 1px solid #ccc;min-height: 60px;line-height: 20px;text-align: center;font-family: Avenir-Medium;font-size: 14px;color: #999;display: flex;align-items: center;"><span>Copyright © 2021-${new Date().getFullYear()} The Apache Software Foundation. Apache SeaTunnel, SeaTunnel, and its feather logo are trademarks of The Apache Software Foundation.</span></div>
<div style="text-align: center;">
<a href="https://twitter.com/asfseatunnel?s=21" target="_blank" title="Twitter" ><svg t="1644553365083" class="icon" viewBox="0 0 1260 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7015" width="38" height="38"><path d="M1259.846921 121.148242c-46.524504 20.728739-96.273478 34.547899-148.325646 40.536201 53.434084-31.784067 94.430924-82.454319 113.777747-142.797982-50.209613 29.480874-105.486251 51.13089-164.447999 62.646857A257.584528 257.584528 0 0 0 872.449815 0.000276c-142.797982 0-258.418284 115.620302-258.418284 258.418284 0 20.268101 2.303193 40.075563 6.909579 58.961748C405.82286 306.32498 215.579097 203.602561 87.98219 47.446058c-22.110655 38.233008-35.008538 82.454319-35.008538 129.900099 0 89.824537 45.603227 168.593747 115.159663 215.118251-42.378756-1.381916-81.99368-12.897882-117.002217-32.244706v3.224471c0 125.293713 88.90326 229.398049 207.287393 253.351259-21.650017 5.988302-44.681949 9.212773-68.17452 9.212773-16.582991 0-32.705344-1.842555-48.827697-4.606387 32.705344 102.722419 128.518184 177.345881 241.374653 179.649074-88.442621 69.095798-199.917175 110.553277-321.06514 110.553277-20.728739 0-41.457479-1.381916-61.72558-3.685109 114.238386 73.241546 250.126788 116.08094 396.149241 116.08094 475.379089 0 735.179289-393.846048 735.179289-735.179289 0-11.055328-0.460639-22.571294-0.921277-33.626621 51.13089-36.851092 94.891562-82.454319 129.439461-134.045848z" fill="#909094" p-id="7016"></path></svg></a>
<a href="https://s.apache.org/seatunnel-slack" target="_blank" title="Slack" style="margin-left: 20px;"><svg t="1644553076784" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3088" width="36" height="36"><path d="M215.125333 647.04a107.861333 107.861333 0 0 1-107.52 107.648A107.861333 107.861333 0 0 1 0 647.04a107.818667 107.818667 0 0 1 107.605333-107.52h107.52v107.52z m54.229334 0a107.818667 107.818667 0 0 1 107.562666-107.52 107.818667 107.818667 0 0 1 107.562667 107.52v269.354667A107.861333 107.861333 0 0 1 376.917333 1024a107.861333 107.861333 0 0 1-107.562666-107.605333v-269.354667zM376.917333 215.125333a107.861333 107.861333 0 0 1-107.562666-107.52A107.861333 107.861333 0 0 1 376.917333 0a107.861333 107.861333 0 0 1 107.562667 107.605333v107.52H376.917333z m0 54.229334a107.861333 107.861333 0 0 1 107.562667 107.562666 107.861333 107.861333 0 0 1-107.562667 107.562667H107.605333A107.861333 107.861333 0 0 1 0 376.917333a107.861333 107.861333 0 0 1 107.605333-107.562666h269.312z m431.872 107.562666a107.861333 107.861333 0 0 1 107.605334-107.562666A107.861333 107.861333 0 0 1 1024 376.917333a107.861333 107.861333 0 0 1-107.605333 107.562667h-107.605334V376.917333z m-54.101333 0a107.861333 107.861333 0 0 1-107.648 107.562667 107.818667 107.818667 0 0 1-107.52-107.562667V107.605333A107.818667 107.818667 0 0 1 647.04 0a107.861333 107.861333 0 0 1 107.648 107.605333v269.312z m-107.648 431.872a107.861333 107.861333 0 0 1 107.648 107.605334A107.861333 107.861333 0 0 1 647.04 1024a107.818667 107.818667 0 0 1-107.52-107.605333v-107.605334h107.52z m0-54.101333a107.818667 107.818667 0 0 1-107.52-107.648 107.776 107.776 0 0 1 107.52-107.52h269.354667A107.818667 107.818667 0 0 1 1024 647.04a107.861333 107.861333 0 0 1-107.605333 107.648h-269.354667z" p-id="3089" fill="#909094"></path></svg></a>
<a href="https://lists.apache.org/[email protected]" target="_blank" title="Mailing list" style="margin-left: 20px;"><svg t="1644553175467" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5304" width="39" height="39"><path d="M853.333333 170.666667H170.666667c-46.933333 0-85.333333 38.4-85.333334 85.333333v512c0 46.933333 38.4 85.333333 85.333334 85.333333h682.666666c46.933333 0 85.333333-38.4 85.333334-85.333333V256c0-46.933333-38.4-85.333333-85.333334-85.333333z m0 170.666666l-341.333333 213.333334-341.333333-213.333334V256l341.333333 213.333333 341.333333-213.333333v85.333333z" p-id="5305" fill="#909094"></path></svg></a>
<a href="https://github.com/apache/seatunnel" target="_blank" title="GitHub" style="margin-left: 20px;"><svg t="1644553223000" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6156" width="36" height="36"><path d="M512 12.64c-282.752 0-512 229.216-512 512 0 226.208 146.72 418.144 350.144 485.824 25.6 4.736 35.008-11.104 35.008-24.64 0-12.192-0.48-52.544-0.704-95.328-142.464 30.976-172.512-60.416-172.512-60.416-23.296-59.168-56.832-74.912-56.832-74.912-46.464-31.776 3.52-31.136 3.52-31.136 51.392 3.616 78.464 52.768 78.464 52.768 45.664 78.272 119.776 55.648 148.992 42.56 4.576-33.088 17.856-55.68 32.512-68.48-113.728-12.928-233.28-56.864-233.28-253.024 0-55.904 20-101.568 52.768-137.44-5.312-12.896-22.848-64.96 4.96-135.488 0 0 43.008-13.76 140.832 52.48a491.296 491.296 0 0 1 128.16-17.248c43.488 0.192 87.328 5.888 128.256 17.248 97.728-66.24 140.64-52.48 140.64-52.48 27.872 70.528 10.336 122.592 5.024 135.488 32.832 35.84 52.704 81.536 52.704 137.44 0 196.64-119.776 239.936-233.792 252.64 18.368 15.904 34.72 47.04 34.72 94.816 0 68.512-0.608 123.648-0.608 140.512 0 13.632 9.216 29.6 35.168 24.576C877.472 942.624 1024 750.784 1024 524.64c0-282.784-229.248-512-512-512z" p-id="6157" fill="#909094"></path></svg></a>
</div>
<div>`,
},
prism: {
theme: require("prism-react-renderer/themes/dracula"),
darkTheme: darkCodeTheme,
},
// https://docusaurus.io/zh-CN/docs/search#connecting-algolia
algolia: {
// The application ID provided by Algolia
appId: "S2J1A7LWND",
// Public API key: it is safe to commit it
apiKey: "a19997f611a73120d7dfb30af9db4d3a",
indexName: "seatunnel-apache",
// Optional: see doc section below
contextualSearch: true,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex: "seatunnel\\.apache\\.org",
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
replaceSearchResultPathname: {
from: "/docs/", // or as RegExp: /\/docs\//
to: "/",
},
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
//... other Algolia params
},
},
plugins: [
"docusaurus-plugin-less",
[
"@docusaurus/plugin-content-docs",
{
id: "seatunnel_web",
path: "seatunnel_web",
routeBasePath: "seatunnel_web",
sidebarCollapsible: true,
editLocalizedFiles: true,
// Please change this to your repo.
editUrl:
"https://github.com/apache/incubator-seatunnel-website/edit/main/",
versions: {
[st_web_versions[0]]: {
path: st_web_versions[0],
},
},
sidebarPath: require.resolve("./sidebarsSeaTunnelWeb.js"),
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "community",
path: "community",
routeBasePath: "community",
editUrl: ({ locale, versionDocsDirPath, docPath }) => {
if (locale !== "en") {
return `https://github.com/apache/incubator-seatunnel-website/edit/main/i18n/${locale}/${docPath}`;
}
return `https://github.com/apache/incubator-seatunnel-website/edit/main/${versionDocsDirPath}/${docPath}`;
},
sidebarPath: require.resolve("./sidebarsCommunity.js"),
},
],
[
"@docusaurus/plugin-content-blog",
{
id: "user_cases",
path: "user_cases",
routeBasePath: "user_cases",
},
],
],
};
module.exports = config;