-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
139 lines (126 loc) · 3.19 KB
/
docusaurus.config.ts
File metadata and controls
139 lines (126 loc) · 3.19 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
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: 'iPanel Docs',
tagline: '一个可以为用户提供简约、快捷的网页控制台的软件',
favicon: 'favicon.ico',
url: 'https://ipaneldev.github.io',
baseUrl: '/',
organizationName: 'iPanelDev',
projectName: 'docs',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},
markdown: {
mermaid: true,
format: 'detect',
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
showLastUpdateTime: true,
showLastUpdateAuthor: true,
editCurrentVersion: true,
editUrl: 'https://github.com/iPanelDev/ipaneldev.github.io/edit/main',
versions: {
current: {
label: '2.3.x',
},
},
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
announcementBar: {
content:
'别忘了给<a href="https://github.com/iPanelDev" style="color: var(--ifm-link-color); text-decoration: var(--ifm-link-decoration);" id="underline-link">给个follow</a>喵 :D',
textColor: 'var(--ifm-color-primary-contrast-foreground)',
backgroundColor: 'var(--ifm-background-surface-color)',
id: '2023.12.2',
},
navbar: {
title: 'iPanel',
logo: {
alt: 'iPanel',
src: 'img/logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'guide',
position: 'left',
label: '指南',
},
{
type: 'docSidebar',
sidebarId: 'development',
position: 'left',
label: '开发',
},
{
type: 'docsVersionDropdown',
position: 'right',
dropdownActiveClassDisabled: true,
},
],
},
footer: {
style: 'light',
links: [
{
title: 'GitHub',
items: [
{
label: '主页',
to: 'https://github.com/iPanelDev',
},
{
label: '讨论',
to: 'https://github.com/orgs/iPanelDev/discussions',
},
{
label: '公告',
to: 'https://github.com/orgs/iPanelDev/discussions/categories/%E5%85%AC%E5%91%8A',
},
],
},
],
copyright: `Copyright © 2023 iPanelDev. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
'json',
'typescript',
'powershell',
'regex',
'http',
'bash',
],
},
} satisfies Preset.ThemeConfig,
themes: [
'@docusaurus/theme-mermaid',
// [
// require.resolve('@easyops-cn/docusaurus-search-local'),
// {
// hashed: true,
// language: ['en', 'zh'],
// },
// ],
],
};
export default config;