-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocusaurus.config.ts
106 lines (92 loc) · 2.45 KB
/
docusaurus.config.ts
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
import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
import remarkDefList from 'remark-deflist'
import 'dotenv/config'
const config: Config = {
title: 'ScopeDB Documents',
favicon: 'brand-kit/favicon.svg',
url: 'https://docs.scopedb.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
// NOTE: DocSearch Crawler needs this to read the proper pages.
trailingSlash: true,
presets: [
[
'classic',
{
docs: false,
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
image: 'brand-kit/centered-sign.jpg',
colorMode: {
defaultMode: 'light',
disableSwitch: true,
},
navbar: {
title: 'DOCUMENTATION',
logo: {
alt: 'ScopeDB Logo',
src: 'brand-kit/horizontal-no-slogan-trimmed.svg',
},
items: [
{ type: 'docSidebar', docsPluginId: 'reference', sidebarId: 'reference', position: 'right', label: 'Reference' },
],
},
footer: {
style: 'dark',
links: [],
copyright: `Copyright (c) ${new Date().getFullYear()} ScopeDB Inc. All rights reserved.`
},
prism: {
theme: prismThemes.github,
},
docs: {
sidebar: {
autoCollapseCategories: true,
}
},
algolia: {
appId: process.env.ALGOLIA_APPID,
apiKey: process.env.ALGOLIA_APIKEY,
indexName: process.env.ALGOLIA_INDEXNAME,
searchPagePath: 'search',
}
} satisfies Preset.ThemeConfig,
markdown: {
parseFrontMatter: async (params) => {
const result = await params.defaultParseFrontMatter(params);
// change the default value of toc_max_heading_level from 3 to 2
if (!result.frontMatter.toc_max_heading_level) {
result.frontMatter.toc_max_heading_level = 2;
}
return result;
}
},
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'reference',
path: 'reference',
routeBasePath: 'reference',
sidebarPath: './reference/sidebars.ts',
remarkPlugins: [remarkDefList],
},
],
],
themes: [],
scripts: [{ src: 'https://plausible.io/js/script.js', defer: true, 'data-domain': 'docs.scopedb.io' }],
};
export default config;