mirror of
https://github.com/Gar-b-age/CookLikeHOC.git
synced 2026-08-12 22:31:02 +00:00
feat: 修改生成的侧边栏链接逻辑,每一类的页面会自动链接到 README 页面
This commit is contained in:
@@ -65,7 +65,8 @@ export function generateNavAndSidebar(rootDir: string) {
|
|||||||
sidebar[`/${dir}/`] = [
|
sidebar[`/${dir}/`] = [
|
||||||
{
|
{
|
||||||
text: 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) {
|
if (readme) {
|
||||||
|
|||||||
Reference in New Issue
Block a user