-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
229 lines (216 loc) · 6.88 KB
/
docusaurus.config.js
File metadata and controls
229 lines (216 loc) · 6.88 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
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
// @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';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'BukuWiki',
tagline: 'Minecraft玩家们的终极游玩指南',
favicon: 'img/favicon.ico',
future: {
v4: true,
experimental_faster: {
rspackBundler: true, // required flag
rspackPersistentCache: true, // new flag
},
},
// Set the production url of your site here
url: 'https://docs.buku.wiki',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
onBrokenAnchors: 'warn',
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},
scripts: [
{
src: 'https://docs.buku.wiki/js/script.js',
async: true,
}
],
plugins: [
'docusaurus-plugin-image-zoom',
[
'@docusaurus/plugin-content-docs',
{
id: 'docs-pc',
path: 'docs-pc',
routeBasePath: 'PC',
editUrl: 'https://github.com/Moralts/BukuWiki/tree/main/',
sidebarPath: './sidebars.js',
editCurrentVersion: true,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
}],
[
'@docusaurus/plugin-content-docs',
{
id: 'docs-android',
path: 'docs-android',
routeBasePath: 'Android',
editUrl: 'https://github.com/Moralts/BukuWiki/tree/main/',
sidebarPath: require.resolve('./sidebars.js'),
editCurrentVersion: true,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
],
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '/',
editUrl: 'https://github.com/Moralts/BukuWiki/tree/main/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
headTags: [],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
// 插件配置文件
({
zoom: {
selector: '.markdown :not(em) > img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(36 36 36 / 80%)',
},
},
// 原生配置文件
image: 'img/docusaurus-social-card.jpg',
announcementBar: {
id: 'beta',
content:
'🚧 文档仍然有许多的内容尚未补全,我们正在持续补充内容,你可以在 <a href="https://github.com/Moralts/BukuWiki/">Github</a> 上一起编写 🚧',
backgroundColor: '#f8d75a',
textColor: '#091E42',
isCloseable: false,
},
algolia: {
appId: 'EK86IMAOMJ',
apiKey: '80e060bceeb14c15260c72a7f2cec366',
indexName: 'buku',
contextualSearch: true,
},
navbar: {
title: 'BukuWiki',
logo: {
alt: 'BukuWiki Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: '通用',
},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'PC',
docsPluginId: 'docs-pc'
},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: '安卓',
docsPluginId: 'docs-android'
},
{
href: 'https://github.com/Moralts/BukuWiki',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{
label: '通用',
to: '/intro',
},
{
label: 'PC',
to: '/PC/intro',
},
{
label: '安卓',
to: '/android/intro',
},
{
label: '贡献者条约',
to: '/contributor-conventions',
},
{
label: '许可声明',
to: '/LICENSE'
},
],
},
{
title: '社区',
items: [
{
label: 'QQ Group',
href: 'https://qm.qq.com/q/lbNpVgNxza',
},
{
label: '编写条例',
to: '/write-specifications'
},
],
},
{
title: '更多',
items: [
{
label: '本项目 GitHub 仓库',
href: 'https://github.com/Moralts/BukuWiki',
},
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},
{
html: `<a href="https://ipw.cn/ssl/?site=docs.buku.wiki" title="本站支持SSL安全访问" target='_blank'><img style='display:inline-block;vertical-align:middle' alt="本站支持SSL安全访问" src="https://static.ipw.cn/icon/ssl-s1.svg"></a><a href="https://ipw.cn/ipv6webcheck/?site=docs.buku.wiki" title="本站支持IPv6访问" target='_blank'><img style='display:inline-block;vertical-align:middle' alt="本站支持IPv6访问" src="https://static.ipw.cn/icon/ipv6-s1.svg"></a>`,
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} <b>by BukuTeam And Github Contributors</b>. <a href="/LICENSE">LICENSE</a>.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;