fix: sidebar behavior

This commit is contained in:
hmol233
2021-09-17 19:42:31 +08:00
parent dc4d98608c
commit 348484c4f7
4 changed files with 24 additions and 8 deletions
+4
View File
@@ -74,6 +74,10 @@ export default defineUserConfig<DefaultThemeOptions>({
"底层传输",
"/config/"
),
"/document/": sidebar.getDocumentSidebar(
"快速入门文档",
"/document/"
),
"/document/level-0/": sidebar.getDocumentLv0Sidebar(
"小小白白话文",
"/document/level-0/"
+20
View File
@@ -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
-4
View File
@@ -1,7 +1,3 @@
---
sidebar: auto
---
# 开发指南
## 编译文档
-4
View File
@@ -1,7 +1,3 @@
---
sidebar: auto
---
# 快速入门
> **这个章节将告诉您如何用最简单的方式获得 Xray,并且开始使用 Xray。**