-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
425 lines (407 loc) · 13.1 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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'ScalarDL Documentation',
tagline: 'Scalable and practical byzantine-fault detection middleware for transactional database systems',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://scalardl.scalar-labs.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'scalar-labs', // Usually your GitHub org/user name.
projectName: 'docs-scalardl', // Usually your repo name.
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en-us',
locales: ['en-us', 'ja-jp'],
localeConfigs: {
'en-us': {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'versioned_docs/en-us',
},
'ja-jp': {
label: '日本語',
direction: 'ltr',
htmlLang: 'ja-JP',
calendar: 'gregory',
path: 'versioned_docs/ja-jp',
},
},
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
breadcrumbs: true,
sidebarPath: './sidebars.js',
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/scalar-labs/docs-scalardl/edit/main',
editLocalizedFiles: true, // This allows for the "Edit this page" button to direct users to edit the localized version of the page on GitHub.
lastVersion: 'current',
versions: {
// The following is a template for adding a new version to the dropdown menu. Copy this version template when adding a new version to the dropdown menu but don't delete it.
/*
current: { // When a new version is released and this is no longer the current version, change this to the version number and then delete this comment.
label: '<VERSION_NUMBER>',
path: 'latest', // When a new version is released and this is no longer the current version, change this to the version number and then delete this comment.
banner: 'none',
},
*/
current: { // When a new version is released and this is no longer the current version, change this to the version number and then delete this comment.
label: '3.9',
path: 'latest', // When a new version is released and this is no longer the current version, change this to the version number and then delete this comment.
banner: 'none',
},
"3.8": {
label: '3.8',
path: '3.8',
banner: 'none',
},
"3.7": {
label: '3.7 (unsupported)',
path: '3.7',
banner: 'unmaintained',
},
"3.6": {
label: '3.6 (unsupported)',
path: '3.6',
banner: 'unmaintained',
},
"3.5": {
label: '3.5 (unsupported)',
path: '3.5',
banner: 'unmaintained',
},
"3.4": {
label: '3.4 (unsupported)',
path: '3.4',
banner: 'unmaintained',
},
},
},
googleTagManager: {
containerId: 'GTM-WL9C9L5',
},
gtag: {
trackingID: 'G-Q4TKS77KCP',
anonymizeIP: true,
},
// Maybe we can use this later.
/*
blog: {
showReadingTime: true,
},
*/
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
// This redirect takes the user to the latest version of the English docs when they land on the English versions of the docs site.
{
to: '/docs/latest/',
from: ['/', '/docs'],
},
{
to: '/docs/latest/releases/release-support-policy',
from: '/docs/releases/release-support-policy',
},
{
to: '/docs/latest/helm-charts/getting-started-scalar-manager',
from: '/docs/latest/helm-charts/how-to-deploy-scalar-manager',
},
{
to: '/docs/3.8/helm-charts/getting-started-scalar-manager',
from: '/docs/3.8/helm-charts/how-to-deploy-scalar-manager',
},
],
createRedirects(existingPath) {
if (existingPath.includes('/ja-jp/docs')) {
// Redirect from /docs/ja-jp/X to /ja-jp/docs/X.
return [
existingPath.replace('/ja-jp/docs', '/docs/ja-jp'),
];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
require.resolve('docusaurus-plugin-image-zoom'),
[
'@docusaurus/plugin-pwa',
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
'mobile',
'always',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/favicon.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json', // your PWA manifest
},
{
tagName: 'meta',
name: 'theme-color',
content: '#2673BB',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-status-bar-style',
content: '#2673BB',
},
{
tagName: 'link',
rel: 'apple-touch-icon',
href: '/img/favicon.png',
},
{
tagName: 'link',
rel: 'mask-icon',
href: '/img/favicon.svg',
color: '#2673BB',
},
{
tagName: 'meta',
name: 'msapplication-TileImage',
content: '/img/favicon.png',
},
{
tagName: 'meta',
name: 'msapplication-TileColor',
content: '#2673BB',
},
],
},
],
// [
// require.resolve("docusaurus-lunr-search"),
// {
// enableHighlight: true,
// languages: ['en', 'ja'], // language codes
// includeRoutes: ['/docs/latest/**', '/ja-jp/docs/latest/**'],
// },
// ],
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
docs: {
sidebar: {
hideable: true,
},
},
// Replace with your project's social card
image: 'img/scalardl-logo.png',
navbar: {
title: '',
logo: {
alt: 'ScalarDL logo',
src: 'img/scalardl-logo.png',
href: '/docs/latest/',
target: '_self',
},
items: [
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: true,
},
{
href: 'https://developers.scalar-labs.com/docs/',
position: 'right',
label: 'Scalar Docs Home',
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/scalar-labs/scalardl',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
algolia: {
// The application ID provided by Algolia
appId: 'CY5H1F29T8',
// Public API key: it is safe to commit it
apiKey: 'fe68b2de652056b08dcdf6439691141b',
indexName: 'scalardl-scalar-labs',
// 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: 'external\\.com|domain\\.com',
// 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
},
footer: {
style: 'dark',
links: [
{
title: 'Products',
items: [
{
label: 'ScalarDB',
href: 'https://www.scalar-labs.com/scalardb',
},
{
label: 'ScalarDL',
href: 'https://www.scalar-labs.com/scalardl',
},
],
},
{
title: 'Company',
items: [
{
label: 'About us',
href: 'https://www.scalar-labs.com/about-us',
},
{
label: 'News',
href: 'https://www.scalar-labs.com/news',
},
{
label: 'Scalar Engineering Blog',
href: 'https://medium.com/scalar-engineering',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/scalar-labs',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/scalarlabs',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/@scalar-labs',
},
{
label: 'Twitter',
href: 'https://twitter.com/scalar_labs',
},
],
},
{
title: 'More',
items: [
{
label: 'Pricing',
href: 'https://www.scalar-labs.com/pricing',
},
{
label: 'Docs',
href: 'https://developers.scalar-labs.com/docs',
},
{
label: 'Support',
href: 'https://www.scalar-labs.com/support',
},
{
label: 'Contact us',
href: 'https://www.scalar-labs.com/contact',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Scalar, Inc.`,
},
mermaid: {
theme: {
light: 'base',
dark: 'base',
},
options: {
themeVariables: {
primaryColor: '#D5EAFF',
primaryTextColor: '#3D4144',
primaryBorderColor: '#2673BB',
lineColor: '#3D4144',
secondaryColor: '#D5EAFF',
tertiaryColor: '#D5EAFF',
},
},
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
// announcementBar: {
// id: 'new_version',
// content:
// '<b>ScalarDL X.X is now available!🥳 For details on what\'s included in this new version, see the <a target="_self" rel="noopener noreferrer" href="/docs/latest/releases/release-notes">release notes</a>.<b>',
// backgroundColor: '#2673BB',
// textColor: '#FFFFFF',
// isCloseable: false,
// },
zoom: {
selector: '.markdown :not(em) > img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
},
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
}
},
}),
};
export default config;