Running npm run version <x> generates broken sidebars on version 1.5.1.
Yup
Sidebar definition sidebar.json
"ORY Hydra": [
"hydra/hydra-index",
{
"type": "subcategory",
"label": "Getting Started",
"ids": [
"hydra/hydra-5min-tutorial"
]
},
{
"type": "subcategory",
"label": "Guides",
"ids": [
"hydra/hydra-oauth2",
"hydra/hydra-jwks",
"hydra/hydra-configure-deploy",
"hydra/hydra-advanced",
"hydra/hydra-debugging",
"hydra/hydra-production",
"hydra/hydra-integration"
]
},
{
"type": "subcategory",
"label": "SDK",
"ids": [
"hydra/hydra-sdk-sdk/hydra-sdk-index",
"hydra/hydra-sdk-sdk/hydra-sdk-api",
"hydra/hydra-sdk-sdk/hydra-sdk-go",
"hydra/hydra-sdk-sdk/hydra-sdk-js"
]
},
{
"type": "subcategory",
"label": "Further Reading",
"ids": [
"hydra/hydra-limitations",
"hydra/hydra-dependencies-environment",
"hydra/hydra-security-architecture",
"hydra/hydra-faq",
"hydra/hydra-appendix"
]
}
],
yields after running npm run version oryOS.9 in ./versioned_sidebars/version-oryOS.9-sidebar.json
{
"version-oryOS.9-docs": {
// ...
"ORY Hydra": [
"version-oryOS.9-hydra/hydra-index",
"version-oryOS.9-[object Object]",
"version-oryOS.9-[object Object]",
"version-oryOS.9-[object Object]",
"version-oryOS.9-[object Object]"
],
// ...
The sidebar should not contain broken links.
The sidebar contains broken links.
git clone https://github.com/ory/docs.gitcd docsgit checkout dd96ee81cf315284ee88dd7d2fe5cb10c60be67d -b reproduceme2cd websitenpm inpm run version oryOS.9cat ./website/versioned_sidebars/version-oryOS.9-sidebars.jsonPretty sure this is related to #410 where this has been resolved in part but apparently not for versioned docs.
This is related to incomplete PR of subcategories feature. We should update the logic for https://github.com/facebook/Docusaurus/blob/master/v1/lib/version.js
Specifically
Test Case:
{
"docs": {
"My Example Category": [
"examples",
{
"type": "subcategory",
"label": "My Example Subcategory",
"ids": [
"my-examples",
...
]
},
],
...
}
}
Cutting the version 1.0.0
Current Behavior:
versioned_sidebars/version-1.0.0-sidebars.json
{
"version-1.0.0-docs": {
"My Example Category": [
"version-1.0.0-examples",
"version-1.0.0-[object Object]",
],
...
}
}
Expected Behavior:
versioned_sidebars/version-1.0.0-sidebars.json
{
"version-1.0.0-docs": {
"My Example Category": [
"version-1.0.0-examples",
{
"type": "subcategory",
"label": "My Example Subcategory",
"ids": [
"version-1.0.0-my-examples",
...
]
},
],
...
}
}
Accepting PRs on this 馃槃
Most helpful comment
Pretty sure this is related to #410 where this has been resolved in part but apparently not for versioned docs.