📝 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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 33 additions and 34 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1921,35 +1921,35 @@
integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA== integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==
"@nullbot/docusaurus-plugin-changelog@^3.0.0": "@nullbot/docusaurus-plugin-changelog@^3.0.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-changelog/-/docusaurus-plugin-changelog-3.1.5.tgz#062d5fdd827b7c9d3f633ac1d69811ac1d454a04" resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-changelog/-/docusaurus-plugin-changelog-3.2.0.tgz#35247a15f207c86d752a8e1496517a4d866593b5"
integrity sha512-yrQyOw6wkSlzn8fvOJv2qr3nwhOoU5UHPuodTY6QSfOYMkFdigBUbR7eg1xfUa5I+g/LeM+4zAji1N2QEsue3g== integrity sha512-o8UjXxa/SEphNXA16f7YT5WBp4DJyQxQ9scbS6UIal/m+VzDOk453UM573jQ1y4aC04ROJuSNGl9fTh0w0ABuA==
dependencies: dependencies:
"@docusaurus/core" "3.5.2" "@docusaurus/core" "3.5.2"
"@docusaurus/plugin-content-docs" "3.5.2" "@docusaurus/plugin-content-docs" "3.5.2"
"@docusaurus/utils-validation" "3.5.2" "@docusaurus/utils-validation" "3.5.2"
fs-extra "^11.2.0" fs-extra "^11.2.0"
"@nullbot/docusaurus-plugin-docsmenu@^3.1.5": "@nullbot/docusaurus-plugin-docsmenu@^3.2.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-docsmenu/-/docusaurus-plugin-docsmenu-3.1.5.tgz#6914d9493ececdab91d36109809ef778e318490b" resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-docsmenu/-/docusaurus-plugin-docsmenu-3.2.0.tgz#ac9a7e117b13b0c03b66f7544ecb9a18a5cd7d4c"
integrity sha512-B0iMQsdEJfxw1DFwN+vKlZ7mDdoZd07XkMtRmC3VwIGxNOyCApDLc3UTtTB/PUAZm+2vNbIC+JttcuSepfNbtA== integrity sha512-oLb//wxtDkbYLhHsdwJ+/Y+JofzEbmCZuBvjILRG7l0GiFYJyy5WmTmciItAM9wyqcsIgT5h31ZpWrT73rg4eg==
dependencies: dependencies:
"@docusaurus/core" "^3.5.2" "@docusaurus/core" "^3.5.2"
"@docusaurus/plugin-content-docs" "^3.5.2" "@docusaurus/plugin-content-docs" "^3.5.2"
"@nullbot/docusaurus-plugin-getsidebar@^3.1.5": "@nullbot/docusaurus-plugin-getsidebar@^3.2.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-getsidebar/-/docusaurus-plugin-getsidebar-3.1.5.tgz#eaf8613354d8b11e4afe27703b05f937add78821" resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-getsidebar/-/docusaurus-plugin-getsidebar-3.2.0.tgz#d9bae43463dd5cedff351a1c07419056a79a3c00"
integrity sha512-6rX40xal1QeSodyk+09P/23tZhOV5GrDuFJ7dzuG5B+m7HrB6uW40QDm9xPn5a/d3wggoGZL7vv7b3h8pxIVLQ== integrity sha512-IpdmCQBSJcQPSxdypRWA86z8aqyKMVp1AS5zLNTgp8Ts4IHBHJ0uEf3Gf0Vh9lJsWKmodHnimEWOvMiylPCS9w==
dependencies: dependencies:
"@docusaurus/core" "^3.5.2" "@docusaurus/core" "^3.5.2"
"@docusaurus/plugin-content-docs" "^3.5.2" "@docusaurus/plugin-content-docs" "^3.5.2"
"@nullbot/docusaurus-preset-nonepress@^3.0.0": "@nullbot/docusaurus-preset-nonepress@^3.0.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-preset-nonepress/-/docusaurus-preset-nonepress-3.1.5.tgz#5a089461bde7a6e1635e7dc23c91af442346a389" resolved "https://registry.npmjs.org/@nullbot/docusaurus-preset-nonepress/-/docusaurus-preset-nonepress-3.2.0.tgz#f1c74f4c54a4d37dfb295028a28d1767a32845b4"
integrity sha512-ZSIRNqAp6/nq8DESYPv0wtcwvYKKCHxk/FDJn1bV3V4DN6n+v5Vk1+IXsAVZKbmQJ1T5hJZ80P6/U/O37oZmDQ== integrity sha512-ug7+b2/b/G9qSlLUcX8Ww3M5oZ093v31/aff+HF7pvXY4sR4VWX7ik/Gfa/WRlarsFwTFCOUh6m7QjTcwYQfHA==
dependencies: dependencies:
"@docusaurus/core" "3.5.2" "@docusaurus/core" "3.5.2"
"@docusaurus/plugin-content-docs" "3.5.2" "@docusaurus/plugin-content-docs" "3.5.2"
@ -1963,12 +1963,12 @@
"@docusaurus/theme-common" "3.5.2" "@docusaurus/theme-common" "3.5.2"
"@docusaurus/theme-search-algolia" "3.5.2" "@docusaurus/theme-search-algolia" "3.5.2"
"@docusaurus/types" "3.5.2" "@docusaurus/types" "3.5.2"
"@nullbot/docusaurus-theme-nonepress" "^3.1.5" "@nullbot/docusaurus-theme-nonepress" "^3.2.0"
"@nullbot/docusaurus-theme-nonepress@^3.1.5": "@nullbot/docusaurus-theme-nonepress@^3.2.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-theme-nonepress/-/docusaurus-theme-nonepress-3.1.5.tgz#fe432c386f2bac6953a5c5ba8a8357eba168df93" resolved "https://registry.npmjs.org/@nullbot/docusaurus-theme-nonepress/-/docusaurus-theme-nonepress-3.2.0.tgz#12dd34e098917ccc7ef8bf7b3db5d972e4deb2df"
integrity sha512-zVq4pYrO8FMS/6BQ3lN9fJSMYutR2J8cK/XEqB1u5CPZ2LXEg881cyXBAy1aBQ6r8O5YnU5YbkUslnLAXAm/SQ== integrity sha512-5bt9DQqZdUGCZufaFdk/l78MBJeWgDgi3igC59lz3rdUeZXK0XfSrA7fZSoV0G0hDs+VNAWaOwTZTnQB6+G4hA==
dependencies: dependencies:
"@docsearch/react" "3.5.2" "@docsearch/react" "3.5.2"
"@docusaurus/core" "3.5.2" "@docusaurus/core" "3.5.2"
@ -1989,8 +1989,8 @@
"@fortawesome/free-solid-svg-icons" "^6.4.0" "@fortawesome/free-solid-svg-icons" "^6.4.0"
"@fortawesome/react-fontawesome" "^0.2.0" "@fortawesome/react-fontawesome" "^0.2.0"
"@mdx-js/react" "^3.0.0" "@mdx-js/react" "^3.0.0"
"@nullbot/docusaurus-plugin-docsmenu" "^3.1.5" "@nullbot/docusaurus-plugin-docsmenu" "^3.2.0"
"@nullbot/docusaurus-plugin-getsidebar" "^3.1.5" "@nullbot/docusaurus-plugin-getsidebar" "^3.2.0"
"@tailwindcss/typography" "^0.5.0" "@tailwindcss/typography" "^0.5.0"
algoliasearch "^4.18.0" algoliasearch "^4.18.0"
algoliasearch-helper "^3.13.3" algoliasearch-helper "^3.13.3"
@ -2012,9 +2012,9 @@
utility-types "^3.10.0" utility-types "^3.10.0"
"@nullbot/docusaurus-tsconfig@^3.0.0": "@nullbot/docusaurus-tsconfig@^3.0.0":
version "3.1.5" version "3.2.0"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-tsconfig/-/docusaurus-tsconfig-3.1.5.tgz#b113129e0d241a17c5b6c4e33926e4813d25d7a5" resolved "https://registry.npmjs.org/@nullbot/docusaurus-tsconfig/-/docusaurus-tsconfig-3.2.0.tgz#8448e7a47d27ce2027c3da8a22ff4a498f0f46fc"
integrity sha512-K2u7kbd6lY/Y6ZST/0lxbm3dbOxiDn2TcnendvY2HE405fNRpXcq7cHg9hL8tU3MqvahgINFDimwfx+MqYFvSQ== integrity sha512-zW48KzrP7XFWd2TjVIqBnjYA3+b9G+PjZPm4M7snbtvqGcnhwrp4t3OR8DBUydk7YFnAE+b0XYZfh+DKadWmSQ==
"@pkgjs/parseargs@^0.11.0": "@pkgjs/parseargs@^0.11.0":
version "0.11.0" version "0.11.0"