-
Notifications
You must be signed in to change notification settings - Fork 98
/
docusaurus.config.js
338 lines (332 loc) · 10.7 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
// @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 math = require('remark-math');
const katex = require('rehype-katex');
const versions = require('./versions.json');
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
(module.exports = {
title: 'Apache DevLake - Open-Source Dev Data Platform for Productivity',
tagline: 'Apache DevLake is an open-source platform that integrates and analyzes data from DevOps tools to provide insights for engineering productivity, DORA metrics, and more.',
url: 'https://devlake.apache.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/logo.svg',
organizationName: 'Apache',
projectName: 'Apache DevLake',
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
sidebarPath: require.resolve('./sidebars.js'),
// set to undefined to remove Edit this Page
editUrl: 'https://github.com/apache/incubator-devlake-website/edit/main',
remarkPlugins: [math, [require('mdx-mermaid'), {
theme: { light: 'neutral', dark: 'forest' }
}]],
rehypePlugins: [katex],
lastVersion: 'current',
versions: {
current: {
label: 'Next',
path: '',
banner: 'none',
},
"v0.19": {
banner: 'none',
},
"v0.18":{
banner: 'none',
},
"v0.17":{
banner: 'none',
},
"v0.16":{
banner: 'none',
},
"v0.15":{
banner: 'none',
}
}
},
gtag: {
trackingID: 'G-PKZLL38MQG',
anonymizeIP: true,
},
blog: {
showReadingTime: true,
readingTime: ({ content, frontMatter, defaultReadingTime }) =>
defaultReadingTime({ content, options: { wordsPerMinute: 300 } }),
// Please change this to your repo.
editUrl: 'https://github.com/apache/incubator-devlake-website/edit/main',
remarkPlugins: [math, [require('mdx-mermaid'), {
theme: { light: 'neutral', dark: 'forest' }
}]],
rehypePlugins: [katex],
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'community',
path: 'community',
routeBasePath: 'community',
sidebarPath: require.resolve('./sidebarsCommunity.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'livedemo',
path: 'livedemo',
routeBasePath: 'livedemo',
sidebarPath: require.resolve('./sidebarsLivedemo.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'download',
path: 'download',
routeBasePath: 'download',
sidebarPath: require.resolve('./sidebarsDownload.js'),
},
],
function tailwindcss() {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
// @ts-ignore
postcssOptions.plugins.push(require('tailwindcss'));
postcssOptions.plugins.push(require('autoprefixer'));
postcssOptions.plugins.push(require('postcss-gap-properties'));
return postcssOptions;
},
};
},
],
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh'],
localeConfigs: {
en: {
htmlLang: 'en-GB',
},
// You can omit a locale (e.g. fr) if you don't need to override the defaults
fa: {
direction: 'rtl',
},
},
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
(
{
metadata: [
{
name: 'keywords',
content: 'Engineering Productivity, Open-Source Engineering, Open-Source Integration Tools, Data Integrates Platform, Open-Source Dev Platform, Open-Source Data Integrates, DevOps Tools Integrates, Open-Source DevOps Tools'
}
],
navbar: {
title: 'Apache DevLake',
logo: {
alt: 'apache devlake',
src: 'img/logo.svg',
},
items: [
{
// type: 'doc',
// docId: 'Overview/Introduction',
position: 'right',
label: 'Docs',
items: [
{
label: "Next",
to: "/docs/Overview/Introduction"
},
{
label: versions[0] + ' (Stable)',
to: "/docs/"+versions[0]+"/Overview/Introduction"
},
{
label: versions[1] + '',
to: "/docs/"+versions[1]+"/Overview/Introduction"
},
...versions.slice(2, versions.length).map((version) => ({
label: version,
to: `docs/${version}/Overview/Introduction`,
}))
]
},
{
type: 'doc',
position: 'right',
label: 'Use Cases',
to: 'livedemo',
docsPluginId: 'livedemo',
docId: 'EngineeringLeads/DORA',
},
{
type: 'doc',
docId: 'index',
position: 'right',
label: 'Community',
docsPluginId: 'community'
},
{
to: '/team',
label: 'Team',
position: 'right'
},
{
to: '/blogOverview',
label: 'Blog',
position: 'right'
},
{
to: 'https://github.com/apache/incubator-devlake',
label: 'GitHub',
position: 'right',
},
{
to: '/download',
label: 'Download',
position: 'right'
},
{
type: 'dropdown',
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: 'Security',
to: 'https://www.apache.org/security/',
},
{
label: 'Privacy',
to: 'https://privacy.apache.org/policies/privacy-policy-public.html',
},
{
label: 'Sponsorship',
to: 'https://www.apache.org/foundation/sponsorship.html',
},
{
label: 'Thanks',
to: 'https://www.apache.org/foundation/thanks.html',
}
],
},
// {
// type: 'localeDropdown',
// position: 'right',
// },
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Getting Started',
to: 'docs/GettingStarted',
},
{
label: 'Data Models',
to: 'docs/DataModels/DevLakeDomainLayerSchema',
},
{
label: 'Engineering Metrics',
to: 'docs/Metrics',
}
],
},
{
title: 'Community',
items: [
{
label: 'Slack',
to: 'https://join.slack.com/t/devlake-io/shared_invite/zt-2ox842kuu-_6x3Lwdj88YpzKhMRpgnMg',
},
{
label: 'GitHub Issue Tracker',
to: 'https://github.com/apache/incubator-devlake/issues',
},
{
label: 'GitHub Issue Tracker For Docs',
to: 'https://github.com/apache/incubator-devlake-website/issues',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
to: 'https://github.com/apache/incubator-devlake',
},
{
label: 'Twitter',
to: 'https://twitter.com/ApacheDevLake',
},
{
label: 'Trademark Guidelines',
to: 'community/trademark',
},
],
},
],
copyright: `
<div style="margin-top: 20px">
<a href="https://incubator.apache.org/" target="_blank"><img style="height:40px; margin-bottom: 10px; margin-top: 10px" alt="Apache Software Foundation" src= "/img/apache-incubator.svg" /></a>
<p style="text-align:left; font-weight: 300; font-size: 0.8em;">Apache DevLake 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 style="text-align:left; font-weight: 300; font-size: 0.8em;">Copyright ©${new Date().getFullYear()} Apache DevLake, DevLake, Apache, the Apache feather logo and the Apache DevLake project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</p>
</div>
`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
docsRouteBasePath: ['docs','livedemo', 'community', 'blog', 'Download'],
hashed: true,
explicitSearchResultPath: true,
}),
],
],
});