forked from halo-dev/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
185 lines (181 loc) · 4.98 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
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
const darkCodeTheme = require("prism-react-renderer/themes/palenight");
const math = require("remark-math");
const katex = require("rehype-katex");
const mermaid = require("mdx-mermaid");
const VersionsArchived = require("./versionsArchived.json");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Halo 1.x 文档",
tagline: "Halo 1.x 的文档站点",
url: "https://docs.halo.run",
baseUrl: "/",
favicon: "img/favicon-96x96.png",
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans"],
},
organizationName: "halo-dev", // Usually your GitHub org/user name.
projectName: "halo", // Usually your repo name.
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/halo-dev/docs/edit/main/",
routeBasePath: "/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
remarkPlugins: [math, mermaid],
rehypePlugins: [katex],
lastVersion: "1.6",
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
sitemap: {
changefreq: "weekly",
priority: 0.5,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
navbar: {
title: "Halo 1.x 文档",
logo: {
alt: "Halo Logo",
src: "https://halo.run/upload/2021/03/Adaptive256-463ca9b92e2d40268431018c07735842.png",
},
items: [
{
href: "https://halo.run",
label: "官网",
},
{
href: "https://bbs.halo.run",
label: "论坛",
},
{
type: "docsVersionDropdown",
position: "right",
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
{
label: "Halo 2.x",
href: "https://docs.halo.run",
},
...Object.entries(VersionsArchived).map(
([versionName, versionUrl]) => ({
label: versionName,
href: versionUrl,
})
),
{
to: "/versions",
label: "All versions",
},
],
},
{
href: "https://github.com/halo-dev/halo",
label: "GitHub",
position: "right",
},
{
href: "https://gitee.com/halo-dev/halo",
label: "Gitee",
position: "right",
},
],
},
footer: {
style: "dark",
copyright: `Copyright © 2023 凌霞软件. Built with Docusaurus.`,
links: [
{
title: "关于",
items: [
{
label: "官网",
href: "https://halo.run",
},
{
label: "应用市场",
href: "https://halo.run/store/apps",
},
{
label: "GitHub 组织",
href: "https://github.com/halo-dev",
},
{
label: "Gitee 组织",
href: "https://gitee.com/halo-dev",
},
{
label: "Server Status",
href: "https://status.halo.run",
},
],
},
{
title: "社区",
items: [
{
label: "官方论坛",
href: "https://bbs.halo.run",
},
{
label: "微信公众号",
href: "https://halo.run/upload/2021/03/B3C27F16-4890-4633-81CC-20BA4B28F94F-2415126255c749b290312ca22d9bdeb0.jpeg",
},
{
label: "GitHub Issues",
href: "https://github.com/halo-dev/halo/issues",
},
{
label: "Telegram Channel",
href: "https://t.me/halo_dev",
},
{
label: "Telegram Group",
href: "https://t.me/HaloBlog",
},
],
},
],
},
prism: {
theme: darkCodeTheme,
darkTheme: darkCodeTheme,
},
zoom: {
selector: ".markdown :not(a) > img",
},
}),
plugins: [require.resolve("docusaurus-plugin-image-zoom")],
scripts: [
{
src: "https://analytics.halo.run/script.js",
async: true,
"data-website-id": "91ecb9ed-2c23-4f27-a413-530da433e0c2",
},
],
stylesheets: [
{
href: "https://unpkg.com/[email protected]/dist/katex.min.css",
type: "text/css",
},
],
};
module.exports = config;