-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocusaurus.config.ts
158 lines (147 loc) · 3.96 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
const config: Config = {
title: '粘液科技中文 Wiki',
tagline: '非官方中文 Wiki',
favicon: 'images/favicon.ico',
url: 'https://slimefun-wiki.guizhanss.cn/',
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: 'facebook', // Usually your GitHub org/user name.
// projectName: 'docusaurus', // Usually your repo name.
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
stylesheets: [
{
href: '/katex/katex.min.css',
type: 'text/css',
},
],
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},
presets: [
[
'classic',
{
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/SlimefunGuguProject/Slimefun-Wiki/tree/master/',
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
},
blog: false,
theme: {
customCss: './src/css/custom.scss',
},
} satisfies Preset.Options,
],
],
themeConfig: {
// Replace with your project's social card
// image: 'img/docusaurus-social-card.jpg',
navbar: {
title: '粘液科技中文 Wiki',
logo: {
alt: 'Wiki Logo',
src: 'images/logo.webp',
},
items: [
{
type: 'docSidebar',
sidebarId: 'rootSidebar',
position: 'left',
label: 'Wiki',
},
{
href: 'https://builds.guizhanss.com/',
position: 'left',
label: '构建站',
},
{
href: 'https://github.com/SlimefunGuguProject/Slimefun-Wiki',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository'
},
],
},
footer: {
style: 'dark',
links: [
{
title: '粘液科技官方版',
items: [
{
label: 'GitHub 仓库',
href: 'https://github.com/Slimefun/Slimefun4',
},
],
},
{
title: '粘液科技汉化版',
items: [
{
label: 'GitHub 仓库',
href: 'https://github.com/StarWishsama/Slimefun4',
},
{
label: 'QQ 群 807302496',
href: 'https://qm.qq.com/q/e1ow0EiP5K',
},
],
},
{
title: '粘液科技汉化版附属',
items: [
{
label: '汉化组 GitHub',
href: 'https://github.com/SlimefunGuguProject',
},
{
label: 'QQ 群 205679802',
href: 'https://qm.qq.com/q/30BNjvNCMM',
},
],
},
],
copyright: `© ${new Date().getFullYear()} ybw0014. 本站内容以 CC BY-NC-SA 4.0 协议发布`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['java', 'groovy'],
},
zoom: {
selector: '.image-gallery .image img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
},
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
}
},
algolia: {
appId: 'GPJA12OFAG',
apiKey: '0a8eaa1c0227a6d389b71bb686ae55a9',
indexName: 'slimefun-guizhanss',
},
} satisfies Preset.ThemeConfig,
plugins: [
'docusaurus-plugin-sass',
'docusaurus-plugin-image-zoom',
[
'@gracefullight/docusaurus-plugin-cloudflare-analytics',
{ token: 'c56a11e845ee4e69b5411c75d11cb242' },
],
],
};
export default config;