feat: implement dynamic branch based docs versioning#757
Open
Jaydeep869 wants to merge 2 commits intoin-toto:mainfrom
Open
feat: implement dynamic branch based docs versioning#757Jaydeep869 wants to merge 2 commits intoin-toto:mainfrom
Jaydeep869 wants to merge 2 commits intoin-toto:mainfrom
Conversation
✅ Deploy Preview for witness-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
i don't see any dropdown for version? could you send me video or ss? |
24e8dbc to
7f63996
Compare
Contributor
Author
|
hey @manzil-infinity180 I can see the version selector entry as Next in the docs navbar. Before
Afterhttps://deploy-preview-757--witness-project.netlify.app/
|
6e326e7 to
14887b5
Compare
Signed-off-by: jaydeep869 <jaydeeppokhariya2106@gmail.com>
14887b5 to
a7496ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR resolves #537 by introducing dynamic, branch based versioning for the Docusaurus documentation site.
As suggested in the issue, rather than relying on Docusaurus's default behavior (which permanently duplicates older docs entirely into the
masterbranch and creates significant clutter over time), this approach allows maintaining older versions purely on remote Git branches nameddocs/X.Y.Z.Changes made
{ type: 'docsVersionDropdown' }indocusaurus.config.jsto render a native version dropdown for users to toggle.build-versions.shscript that runs in CI. Beforenpm run buildis called:docs/*(e.g.docs/0.7.0).git archiveto pull only the documentation from those specific older branches.versioned_docs/folder right at build time.versions.json.How to release a new version of docs going forward:
Whenever the maintainers want to snapshot a version (e.g.,
0.6.0), all they have to do is check out the commit they want and run:git checkout -b docs/0.6.0 && git push origin docs/0.6.0The setup in this PR will then automatically include it in the version dropdown!
Fixes #537
Acceptance Criteria Met