Closed
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Motivation
As part of #5830 I had to start a refactor we wanted to do for a long time:
- Docs versioned sidebars are not normalized anymore when created (ie category and docs shorthand are kept, default options are not "freezed")
- Not adding a version prefix in versioned sidebar items
- Using an unversioned docId everywhere ("dir/doc") instead of a versioned docId ("version-1.0.0/dir/doc")
The implementation in this PR is just the beginning:
- New sidebars are copied un-normalized
- Allow using both versioned / unversioned doc ids for retrocompatibility
We should now:
- Deprecating the
doc.id
asap with a clear warning telling the user to upgrade the sidebar files (ie removing the version prefixes) - Plan a breaking change in a few months
- Do the cleanup: remove
doc.id
, then renamedoc.unversionedId
todoc.id
Or maybe we could do the breaking change / cleanup immediately, considering it's not too painful for users to remove the sidebar prefix?
(but how would they discover what they need to do, we probably still need a good error message in our code?)
Self-service
- I'd be willing to do some initial work on this proposal myself.