forked from apache/inlong-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
264 lines (263 loc) · 7.61 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
// 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 InLong',
tagline: 'Apache InLong is a one-stop integration framework for massive data that provides automatic, secure and reliable data transmission capabilities.',
url: 'https://inlong.apache.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/logo.svg',
organizationName: 'Apache', // Usually your GitHub org/user name.
projectName: 'inlong', // Usually your repo name.
customFields: {
team: require('./config/team.json'),
contributors: require('./config/contributors.json'),
docContributors: require('./config/doc-contributors.json')
},
scripts: [
{
src: 'https://www.apachecon.com/event-images/snippet.js',
async: true,
},
],
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,
// Please change this to your repo.
editUrl: 'https://github.com/apache/inlong-website/edit/master/',
},
blog: {
// showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/apache/inlong-website/edit/master/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Apache InLong',
logo: {
alt: 'Apache',
src: 'img/logo.svg',
},
items: [
{
position: 'right',
label: 'Docs',
to: "/docs/introduction",
items: [
{
label: "Next",
to: "/docs/next/introduction",
},
{
label: "1.4.0",
to: "/docs/introduction",
},
{
label: "1.3.0",
to: "/docs/1.3.0/introduction",
},
{
label: "1.2.0",
to: "/docs/1.2.0/introduction",
},
{
label: "All versions",
to: "/versions/",
},
],
},
{
to: '/downloads',
position: 'right',
label: 'Download',
},
{
to: '/community/how-to-contribute',
label: 'Community',
position: 'right',
activeBaseRegex: `/community/`,
},
{
to: '/blog',
label: 'Blog',
position: 'right'
},
{
to: '/team',
label: 'Team',
position: 'right'
},
{
label: 'ASF',
position: 'right',
items: [
{
label: "Apache Software 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: "Privacy",
to: "https://www.apache.org/foundation/policies/privacy.html",
},
{
label: "Thanks",
to: "https://www.apache.org/foundation/thanks.html",
},
],
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/apache/inlong',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
links: [
{
title: 'Events',
items: [
{
label: 'ApacheCon',
href: 'https://www.apachecon.com/',
},
{
html: '<a class="acevent" data-format="square" data-mode="dark" data-event="random"></a>',
},
],
},
{
title: 'Community',
items: [
{
label: 'Twitter',
href: 'https://twitter.com/ApacheInlong',
},
{
label: 'WeChat',
href: 'https://inlong.apache.org/img/apache-inlong-wechat.jpg',
},
{
label: 'Email',
to: 'mailto:dev@inlong.apache.org',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/apache/inlong',
},
],
},
],
logo: {
alt: 'Apache InLong',
src: 'img/asf_logo.svg',
},
copyright: `<div style="font-family: Avenir-Medium;font-size: 14px;color: #999;">
<div>Copyright © 2020-2022 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.</div>
<div style="margin-top: 20px; padding-top: 20px; border-top: 1px solid #666;line-height: 20px;">The Apache Software Foundation Apache InLong, InLong, Apache, the Apache feather, and the Apache InLong project logo are either registered trademarks or trademarks of the Apache Software Foundation.</div>
</div>`,
},
prism: {
theme: require('prism-react-renderer/themes/dracula'),
darkTheme: darkCodeTheme,
},
algolia: {
appId: 'YUW9QEL53E',
apiKey: 'fcc3191e7a0fb95834381a6c9faecde9',
indexName: 'inlong',
contextualSearch: true,
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
}),
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/inlong-website/edit/master/i18n/${locale}/${docPath}`;
}
return `https://github.com/apache/inlong-website/edit/master/${versionDocsDirPath}/${docPath}`;
},
sidebarPath: require.resolve('./sidebarsDevelopment.js'),
},
],
[
'@docusaurus/plugin-content-pages',
{
id: 'download',
path: 'download',
routeBasePath: 'download',
},
],
]
});