-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
65 lines (63 loc) · 1.67 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
65 lines (63 loc) · 1.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
const { themes } = require('prism-react-renderer');
module.exports = {
title: '小友+',
tagline: '轻量快速的计算机自动化工具',
url: 'https://winui.net',
baseUrl: '/winui/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'favicon.ico',
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'docx', // 文档源文件在 docx 目录
routeBasePath: 'docs', // 访问路径为 /docs
sidebarPath: require.resolve('./sidebars.js'), // 确保文件名一致
editUrl: 'https://github.com/your/repo/edit/main/docx/',
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
themeConfig: {
navbar: {
title: '小友+',
logo: {
alt: 'logo',
src: 'favicon.ico', // 对应 static/favicon.ico
},
items: [
{
type: 'docSidebar', // 推荐用法:直接绑定侧边栏
sidebarId: 'sidebar', // 对应 sidebars.js 里的导出的 key 名
position: 'left',
label: '文档',
},
{
href: 'https://shelllet.github.io/winui/#/',
label: '开发版',
position: 'right',
},
{
href: 'https://winui.net/#/',
label: '发布版',
position: 'right',
},
{
to: 'docs/CHANGELOG', // 如果 CHANGELOG 在 docx 目录下,路径应加 docs/ 前缀
label: '更新日志',
position: 'right',
},
],
},
prism: {
theme: themes.github,
darkTheme: themes.dracula,
},
},
};