docs.page
docs.page copied to clipboard
Support versioning
It would be great if there was an option to show the version of the docs at the last tag by default.
This would solve an issue that has come up multiple times for users of Melos, where the docs are updated as part of a PR, but it takes some time before a new release is published. During that time, the docs are not fully in sync with the last version and that confuses users. For the Melos repo, we would need to be able to specify a prefix to match only the tags for the melos
package releases, e.g. melos-v
.
As a bonus, but not as important, there could be a menu that allows users to switch between the docs for different versions.

Maybe in the docs.json we have
- where
current_version
is by defaultlatest
which means, that it takes the first element of the index - current version can be among the version list
"current_version": "latest",
"versions": [
"1.2.1",
"1.1.3",
"1.0.9",
"early-bird",
"canary",
]
And docs.page, uses the face value in versions
to get the docs structure, on a folder system.
docs/
├─ 1.0.0/docs.json
├─ 2.0.0/docs.json
├─ 3.0.0/docs.json
where each folder has its own docs.json and its index.mdx, as for each version the sidebar might be different.
- docs.json does not exist, it will take the root docs.json as same structure appending the path with its current version.