This repository was archived by the owner on Feb 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
180 lines (170 loc) · 4.67 KB
/
docusaurus.config.ts
File metadata and controls
180 lines (170 loc) · 4.67 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
import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
const number = '津ICP备2023004480号'
const link = `<a class="footer__link-item navbar__item" href="https://beian.miit.gov.cn/" target="_blank">${number}</a>`
const config: Config = {
title: 'YunzaiJS',
tagline: 'QQ群机器人开发框架',
// favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://yunzaijs.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/docs/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'yunzaijs', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'en',
locales: ['en']
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/yunzaijs/docs/tree/main/'
},
theme: {
customCss: './src/css/custom.css'
}
} satisfies Preset.Options
]
],
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'YunzaiJS',
// logo: {
// alt: 'Miao-Yunzai Logo',
// src: 'img/logo.svg',
// },
items: [
{
position: 'left',
label: '文档',
type: 'docSidebar',
sidebarId: 'tutorialSidebar'
},
{ to: 'blog', label: '动态', position: 'left' }, // or position: 'right'
{
position: 'left',
label: '编辑',
href: 'https://github.com/yunzaijs/docs/blob/main/docs/intro.md'
},
{
position: 'right',
href: 'https://lvyjs.dev/',
label: '环境'
},
{
position: 'right',
href: 'https://github.com/yunzaijs/core',
label: '源码'
}
]
},
/**
* 页脚
*/
footer: {
style: 'dark',
links: [
{
title: '教程',
items: [
{
label: '简介',
to: '/docs/docs/intro'
},
{
label: '模块',
to: '/docs/docs/category/module-shop'
}
]
},
{
title: '社区',
items: [
{
label: 'Yunzai Group',
href: 'https://qm.qq.com/q/I2YvyU0LQI'
},
{
label: 'Yunzai-Bot V3 Plugins',
href: 'https://github.com/yhArcadia/Yunzai-Bot-plugins-index'
},
{
label: 'Icqq DOCS',
href: 'https://icqq.pages.dev/'
}
]
},
{
title: '更多',
items: [
{
label: 'TRSS-Yunzai V3',
href: 'https://github.com/TimeRainStarSky/Yunzai'
},
{
label: 'Miao-Yunzai V3',
href: 'https://github.com/yoimiya-kokomi/Miao-Yunzai/tree/master'
},
{
label: 'Yunzai-Bot V3',
href: 'https://gitee.com/Le-niao/Yunzai-Bot/tree/main'
},
{
label: 'Yunzai-Bot V2',
href: 'https://gitee.com/Le-niao/Yunzai-Bot/tree/master'
}
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} YunzaiJS ${link}`
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula
}
} satisfies Preset.ThemeConfig,
// themes: ['@docusaurus/theme-live-codeblock'],
themes: [
// ... Your other themes.
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
{
// ... Your options.
indexDocs: true,
indexBlog: false,
indexPages: true,
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
language: ['en', 'zh'],
searchResultLimits: 10,
searchResultContextMaxLength: 50
}
]
],
plugins: [
// [
// '@docusaurus/plugin-content-blog',
// {
// id: 'second-blog',
// routeBasePath: 'my-version',
// path: './version',
// },
// ],
]
}
export default config