fix: sidebar behavior

pull/116/head
hmol233 3 years ago
parent dc4d98608c
commit 348484c4f7
No known key found for this signature in database
GPG Key ID: D617A9DAB0C992D5

@ -74,6 +74,10 @@ export default defineUserConfig<DefaultThemeOptions>({
"底层传输",
"/config/"
),
"/document/": sidebar.getDocumentSidebar(
"快速入门文档",
"/document/"
),
"/document/level-0/": sidebar.getDocumentLv0Sidebar(
"小小白白话文",
"/document/level-0/"

@ -80,6 +80,26 @@ export function getConfigSidebar(
];
}
export function getDocumentSidebar(
title: string,
path: string
): SidebarConfigArray {
return [
{
text: title,
children: [
path + "install.md",
path + "config.md",
path + "command.md",
path + "document.md",
path + "level-0",
path + "level-1",
path + "level-2",
],
},
];
}
export function getDocumentLv0Sidebar(
title: string,
path: string

@ -1,7 +1,3 @@
---
sidebar: auto
---
# 开发指南
## 编译文档

@ -1,7 +1,3 @@
---
sidebar: auto
---
# 快速入门
> **这个章节将告诉您如何用最简单的方式获得 Xray并且开始使用 Xray。**

Loading…
Cancel
Save