forked from sidorares/node-mysql2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.ts
118 lines (111 loc) · 2.76 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
107
108
109
110
111
112
113
114
115
116
117
118
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { navbarLocalePlugin, getLocaleURL } from './plugins/locale.js';
const config: Config = {
title: 'Quickstart',
url: 'https://sidorares.github.io/',
baseUrl: '/node-mysql2/',
organizationName: 'sidorares',
projectName: 'node-mysql2',
trailingSlash: false,
favicon: 'img/favicon.svg',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onBrokenAnchors: 'throw',
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-CN', 'pt-BR'],
localeConfigs: {
en: {
label: '🇺🇸 English',
},
'zh-CN': {
label: '🇨🇳 简体中文',
},
'pt-BR': {
label: '🇧🇷 Português (Brasil)',
},
},
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/sidorares/node-mysql2/tree/master/website/',
},
theme: {
customCss: './src/css/custom.scss',
},
blog: false,
} satisfies Preset.Options,
],
],
themeConfig: {
// image: 'img/mysql2-social-card.jpg',
navbar: {
// logo: {
// alt: 'MySQL2 Logo',
// src: 'img/logo.svg',
// },
items: [
{
to: getLocaleURL(),
label: 'MySQL2',
position: 'left',
className: 'navbar__brand navbar__manual--title text--truncate',
activeBaseRegex: `^/$`,
},
{
to: '/docs/documentation',
label: 'Docs',
position: 'left',
},
{
to: '/docs/examples',
label: 'Examples',
position: 'left',
},
{
to: '/docs/faq',
label: 'FAQ',
position: 'left',
},
{
href: 'https://github.com/sidorares/node-mysql2',
label: 'GitHub',
position: 'right',
},
{
href: 'https://stackoverflow.com/questions/tagged/mysql2',
label: 'Stack Overflow',
position: 'right',
},
{
href: 'https://github.com/sponsors/sidorares',
label: 'Donate',
position: 'right',
},
{ type: 'search', position: 'right' },
{
type: 'localeDropdown',
position: 'right',
},
],
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['json', 'bash', 'tsx'],
},
} satisfies Preset.ThemeConfig,
plugins: [
'docusaurus-plugin-sass',
'@easyops-cn/docusaurus-search-local',
navbarLocalePlugin,
],
};
export default config;