-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.ts
142 lines (132 loc) · 3.64 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: 'Ayame Docs',
tagline: 'GeckoLib 驱动的自定义玩家模型模组',
favicon: 'img/logo.png',
url: 'https://ayamemc.org',
baseUrl: '/',
organizationName: 'AyameMC',
projectName: 'Docs',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans', 'en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/AyameMC/Docs/tree/main',
},
blog: {
showReadingTime: false,
feedOptions: {
type: ['rss', 'atom'],
xslt: true,
},
editUrl: 'https://github.com/AyameMC/Docs/tree/main',
onInlineTags: 'warn',
onInlineAuthors: 'warn',
onUntruncatedBlogPosts: 'warn',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
language: ["en", "zh"],
},
],
],
themeConfig: {
image: 'img/docusaurus-social-card.jpg',
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
hideOnScroll: true,
title: 'Ayame Docs',
logo: {
alt: 'Ayame Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'dropdown',
label: '文档',
position: 'left',
items: [
{
type: 'doc',
label: '用户文档',
docId: 'user-doc/intro',
},
{
type: 'doc',
label: '开发文档',
docId: 'dev-doc/intro',
},
// ... more items
],
},
{ to: '/blog', label: '更新日志', position: 'right' },
{ type: 'localeDropdown', position: 'right' },
],
},
footer: {
style: 'dark',
links: [
{
title: '页面',
items: [
{ label: '用户文档', to: '/docs/user-doc/intro' },
{ label: '开发文档', to: '/docs/dev-doc/intro' },
{ label: '更新日志', to: '/blog' },
],
},
{
title: '社群',
items: [
{ label: 'MC 百科', href: 'https://www.mcmod.cn' },
{ label: 'Modrinth', href: 'https://modrinth.com' },
{ label: 'CurseForge', href: 'https://curseforge.com' },
],
},
{
title: '相关链接',
items: [
{ label: '文档 GitHub', href: 'https://github.com/AyameMC/Docs' },
{ label: 'Ayame GitHub', href: 'https://github.com/AyameMC/Ayame' },
],
},
{
title: '友情链接',
items: [
{ label: 'YSM 文档', href: 'http://ysm.cfpa.team/' },
],
}
],
copyright: `Copyright © ${new Date().getFullYear()} AyameMC. Docs licensed under <a href="https://creativecommons.org/publicdomain/zero/1.0/deed" target="_blank">CC0 1.0</a>. Built with <a href="https://docusaurus.io/" target="_blank">Docusaurus</a>.`,
},
prism: {
defaultLanguage: 'java',
theme: prismThemes.oneLight,
darkTheme: prismThemes.oneDark,
additionalLanguages: ['java', 'groovy', 'gradle'],
},
},
};
export default config;