-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
195 lines (183 loc) · 4.74 KB
/
docusaurus.config.ts
File metadata and controls
195 lines (183 loc) · 4.74 KB
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
import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
import changelogJsonPlugin from './plugins/changelog-json-plugin'
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: 'DesireCore Docs',
tagline: 'DesireCore 官方文档',
favicon: 'img/favicon.ico',
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true,
},
headTags: [
{
tagName: 'meta',
attributes: {
name: 'algolia-site-verification',
content: '55C74A6868CDD87B',
},
},
],
url: 'https://docs.desirecore.com',
baseUrl: '/',
organizationName: 'desirecore',
projectName: 'docs',
onBrokenLinks: 'throw',
// 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: 'zh-Hans',
locales: ['zh-Hans', 'en'],
localeConfigs: {
'zh-Hans': { label: '中文' },
en: { label: 'English' },
},
},
plugins: [changelogJsonPlugin],
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/desirecore/docs/edit/main/',
routeBasePath: '/',
sidebarCollapsible: true,
sidebarCollapsed: true,
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: 'DesireCore',
logo: {
alt: 'DesireCore Logo',
src: 'img/icon.png',
},
items: [
// ===== 左侧 =====
{
to: '/',
label: '文档首页',
position: 'left',
activeBaseRegex: '^/$',
},
{
to: '/getting-started',
label: '快速上手',
position: 'left',
},
{
to: '/user-guide',
label: '功能指南',
position: 'left',
},
{
to: '/use-cases',
label: '应用场景',
position: 'left',
},
{
to: '/concepts',
label: '概念解析',
position: 'left',
},
{
to: '/faq',
label: '常见问题',
position: 'left',
},
{
to: '/more',
label: '更多',
position: 'left',
},
// ===== 右侧 =====
{
type: 'search',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://www.desirecore.cn',
label: '官网',
position: 'right',
customProps: {
localeHrefs: {
en: 'https://www.desirecore.com',
},
},
},
{
href: 'https://github.com/desirecore/docs',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{ label: '快速上手', to: '/getting-started' },
{ label: '功能指南', to: '/user-guide' },
{ label: '应用场景', to: '/use-cases' },
],
},
{
title: '资源',
items: [
{ label: '概念解析', to: '/concepts' },
{ label: '更多', to: '/more' },
{ label: '常见问题', to: '/faq' },
],
},
{
title: '社区',
items: [
{ label: '官方网站', href: 'https://www.desirecore.com' },
{ label: '文档仓库', href: 'https://github.com/desirecore/docs' },
],
},
{
title: '法律声明',
items: [
{ label: '隐私政策', to: '/privacy' },
{ label: '使用条款', to: '/terms' },
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Yunnan Solar Corona Technology Co., Ltd. All rights reserved.`,
},
algolia: {
appId: '68TB6NUYVW',
apiKey: 'd22553216ab4cff9ec3a7d146b0572c4',
indexName: 'DesireCore Docs',
contextualSearch: true,
askAi: 'giKzdtAUC3FW',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
}
export default config