-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocusaurus.config.js
98 lines (90 loc) · 2.51 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
// @ts-check
const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '正山小种 - Minecraft 模组开发指南',
tagline: '一篇以尽可能简洁的篇幅带领 Minecraft 玩家入门的 Minecraft 模组开发指南',
url: 'https://www.teacon.cn/',
trailingSlash: false,
baseUrl: '/xiaozhong/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'zh',
locales: ['zh'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
blog: false,
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./src/sidebars.js'),
editUrl({ docPath }) {
return 'https://github.com/teaconmc/Xiaozhong/blob/1.21-neoforge/docs/' + docPath
}
},
theme: {
customCss: [require.resolve('./src/custom.css')],
},
}),
],
],
themes: [
[
"@easyops-cn/docusaurus-search-local",
{
hashed: true,
language: ['en', 'zh'],
docsRouteBasePath: '/',
explicitSearchResultPath: true,
highlightSearchTermsOnTargetPage: true,
}
]
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: '正山小种 - Forge 模组开发指南',
items: [
{
position: 'right',
to: '1.21-neoforge',
label: '1.21-NeoForge',
},
{
position: 'right',
to: '1.19.x',
label: '1.19.x-Forge',
},
{
position: 'right',
to: '1.18.x',
label: '1.18.x-Forge',
},
{
position: 'right',
href: 'https://github.com/teaconmc/Xiaozhong',
label: 'GitHub',
},
],
},
footer: {
style: 'dark',
copyright: ''.concat(
`Copyright ©2022-${Math.min(2023, new Date().getFullYear())} TeaCon 执行委员会`, ` | `,
`<a href="https://beian.miit.gov.cn/" style="color:var(--ifm-footer-color)">闽ICP备20015816号</a>`,
),
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['bash', 'groovy', 'java', 'json', 'toml', 'kotlin'],
},
}),
}
module.exports = config