mirror of
https://github.com/Gar-b-age/CookLikeHOC.git
synced 2025-12-26 03:48:31 +08:00
feat: 修改生成的侧边栏链接逻辑,每一类的页面会自动链接到 README 页面
This commit is contained in:
parent
86296b26b9
commit
ca6fa28d0f
@ -65,7 +65,8 @@ export function generateNavAndSidebar(rootDir: string) {
|
||||
sidebar[`/${dir}/`] = [
|
||||
{
|
||||
text: dir,
|
||||
items,
|
||||
link: readme ? `/${encodeURI(dir)}/${encodeURI(readme)}` : undefined,
|
||||
items: items.filter((i) => i.link !== (readme ? `/${encodeURI(dir)}/${encodeURI(readme)}` : undefined)),
|
||||
},
|
||||
]
|
||||
if (readme) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user