docs.page icon indicating copy to clipboard operation
docs.page copied to clipboard

Support versioning

Open blaugold opened this issue 2 years ago • 2 comments

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.

blaugold avatar Feb 04 '23 16:02 blaugold

image +1 It'd be great to support versioning in the header based on git tags (like docusaurus)

gabsn avatar Feb 23 '23 10:02 gabsn

Maybe in the docs.json we have

  • where current_version is by default latest 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.

eznix86 avatar Aug 16 '23 07:08 eznix86