mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-10-13 17:58:27 +03:00
fix: sidebar behavior
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user