📝 Docs: Changelog 按页码挂载 route (#3100)

This commit is contained in:
StarHeart
2024-11-01 13:54:27 +08:00
committed by GitHub
parent c5aa5d3deb
commit 2b8aae4eee
5 changed files with 33 additions and 34 deletions

View File

@ -337,7 +337,8 @@ export default async function createConfigAsync() {
changelogHeader: `description: Changelog
toc_max_heading_level: 2
sidebar_custom_props:
sidebar_id: changelog`,
sidebar_id: changelog
sidebar_version: current`,
} satisfies ChangelogOptions,
],
],

View File

@ -146,9 +146,7 @@ const sidebars: SidebarsConfig = {
(chunk, index) => ({
type: "link",
label: chunk[0]!.title,
href: `/changelog/${
index > 0 ? encodeURIComponent(chunk[0]!.title) : ""
}`,
href: `/changelog/${index > 0 ? index.toString() : ""}`,
})
),
},

View File

@ -138,17 +138,17 @@
{
"type": "link",
"label": "v2.1.0",
"href": "/changelog/v2.1.0"
"href": "/changelog/1"
},
{
"type": "link",
"label": "v2.0.0-beta.2",
"href": "/changelog/v2.0.0-beta.2"
"href": "/changelog/2"
},
{
"type": "link",
"label": "v2.0.0a7",
"href": "/changelog/v2.0.0a7"
"href": "/changelog/3"
}
],
"collapsed": false

View File

@ -138,17 +138,17 @@
{
"type": "link",
"label": "v2.1.0",
"href": "/changelog/v2.1.0"
"href": "/changelog/1"
},
{
"type": "link",
"label": "v2.0.0-beta.2",
"href": "/changelog/v2.0.0-beta.2"
"href": "/changelog/2"
},
{
"type": "link",
"label": "v2.0.0a7",
"href": "/changelog/v2.0.0a7"
"href": "/changelog/3"
}
]
}