Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
205 lines (194 loc) · 10.2 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
205 lines (194 loc) · 10.2 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
// @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: "量筒的 Minecraft 基岩版开发文档",
tagline: "致力于做人人都能看得懂的 Minecraft 基岩版中文开发教程!",
favicon: "site/YZBWDLT.jpg",
// Set the production url of your site here
url: "https://mcdevdoc.nekoawa.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "YZBWDLT", // Usually your GitHub org/user name.
projectName: "mcdevdoc", // Usually your repo name.
onBrokenLinks: "ignore",
onBrokenAnchors: "ignore",
markdown: {
hooks: {
onBrokenMarkdownLinks: "warn",
},
},
// 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"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: "./sidebars.js",
editUrl: "https://github.com/YZBWDLT/mcdevdoc/tree/main/",
showLastUpdateTime: true,
},
blog: {
showReadingTime: true,
feedOptions: {
type: ["rss", "atom"],
xslt: true,
},
blogSidebarCount: "ALL",
editUrl: "https://github.com/YZBWDLT/mcdevdoc/tree/main/",
onInlineTags: "warn",
onInlineAuthors: "warn",
onUntruncatedBlogPosts: "ignore",
},
theme: {
customCss: "./src/css/custom.css",
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: "site/YZBWDLT.jpg",
docs: {
sidebar: {
hideable: true,
},
},
// 搜索栏
algolia: {
appId: "655TGMKJ7M",
apiKey: "387d6d10fb077b8da37cd6a79c79f800",
indexName: "yzbwdlt",
},
// 顶部栏
navbar: {
title: "量筒的 Minecraft 基岩版开发文档",
logo: { alt: "Logo", src: "site/YZBWDLT.jpg" },
items: [
{
label: "教程",
type: "dropdown",
items: [
{ label: "模块 1:命令", type: "docSidebar", sidebarId: "tutorialCommands" },
{ label: "模块 2:附加包", type: "docSidebar", sidebarId: "tutorialAddons" },
{ label: "模块 3:脚本", type: "docSidebar", sidebarId: "tutorialScripts" },
],
},
{
label: "文档",
type: "dropdown",
items: [
{ label: "命令", type: "docSidebar", sidebarId: "docCommands" },
{ label: "附加包", type: "docSidebar", sidebarId: "docAddons" },
{ label: "物品", type: "docSidebar", sidebarId: "docItems" },
{ label: "方块", type: "docSidebar", sidebarId: "docBlocks" },
{ label: "实体", type: "docSidebar", sidebarId: "docEntities" },
{ label: "脚本", type: "docSidebar", sidebarId: "docScripts" },
],
},
{ label: "预设模板", type: "docSidebar", sidebarId: "devTemplate", position: "left" },
{ label: "更新前瞻", type: "docSidebar", sidebarId: "updateLog", position: "left" },
{ label: "个人博客", to: "/blog", position: "left" },
{ type: "search", position: "right" },
{
html: `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor" style="vertical-align: middle;">
<path d="M19.14 12.94a7.07 7.07 0 0 0 0-1.88l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96a7.04 7.04 0 0 0-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84a.49.49 0 0 0-.48.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.49.49 0 0 0 .12.61l2.03 1.58a7.07 7.07 0 0 0 0 1.88l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.49.37 1.03.7 1.62.94l.36 2.54c.05.24.26.41.48.41h3.84c.22 0 .43-.17.48-.41l.36-2.54c.59-.24 1.13-.57 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32a.49.49 0 0 0-.12-.61l-2.03-1.58zM12 15.6A3.6 3.6 0 1 1 15.6 12 3.6 3.6 0 0 1 12 15.6z"/>
</svg>
`,
href: "/settings",
position: "right",
},
{
html: `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor" style="vertical-align: middle;">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>
</svg>
`,
href: "https://github.com/YZBWDLT/mcdevdoc",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: `我们的作品`,
items: [],
},
{
title: `常用文档`,
items: [
{ label: "命令", to: "docs/docs/commands/all_commands" },
{ label: "物品组件", to: "docs/docs/items/components" },
{ label: "方块组件", to: "docs/docs/blocks/components" },
],
},
{
title: `友情链接`,
items: [
{ label: "量筒测试群群文档", href: "https://docs.nekoawa.com" },
{ label: "祉语的个人主页", href: "https://xiaozhiyuqwq.top" },
{ label: "小飞侠的博客", href: "https://wstd.pages.dev/" },
{ label: "Xero的个人主页", href: "https://projectxero.top" },
{ label: "萝卜的ModSAPI项目", href: "https://modsapi.nekoawa.com/" },
],
},
{
title: `相关外部文档与常用链接`,
items: [
{ label: "中文 Minecraft Wiki", href: "https://zh.minecraft.wiki/" },
{
label: "微软文档",
href: "https://learn.microsoft.com/en-us/minecraft/creator/?view=minecraft-bedrock-stable",
},
{ label: "基岩版开发 Wiki", href: "https://wiki.mcbe-dev.net/p/Minecraft基岩版开发Wiki" },
{ label: "Bedrock Wiki", href: "https://wiki.bedrock.dev/" },
],
},
{
title: `关于`,
items: [
{
label: "授权:CC BY-NC-SA 4.0",
href: "https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans",
},
{ label: "字体:MiSans", href: "https://hyperos.mi.com/font" },
{ label: "网站构建:Docusaurus", href: "https://docusaurus.io/" },
{ label: "GitHub", href: "https://github.com/YZBWDLT/mcdevdoc" },
{ label: "联系我们:QQ 群 673941729", href: "https://qm.qq.com/q/CAJQrm3Rao" },
],
},
],
copyright: `版权归 © 2019 - ${new Date().getFullYear()} 一只卑微的量筒所有。除特殊声明外,本站中的内容均使用 CC BY-NC-SA 4.0 授权。`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
colorMode: {
defaultMode: "dark",
disableSwitch: true,
},
}),
themes: ["@docusaurus/theme-live-codeblock"],
};
export default config;