-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use git tags for versioning #557
Comments
I would really like this |
@endiliey Why was this closed? It would be a really neat feature. Creating subfolders for versions is a lot of extra work for things git already knows. Could this maybe implemented via plugin? |
Hey Docusaurus encourage the usage of versioning on a single Git branch, but nothing prevents you from reverting to the old more usual behavior of having multiple Git branches for each version. In fact, it's possible to use a hybrid (Git branches + versioned folders), and this is exactly what we do ourselves for Docusaurus v1: Notice also that older v2 alpha/beta versions (that we do not update anymore) have been archived to standalone immutable static deployments, and remain accessible forever. https://docusaurus.io/versions Docusaurus only encourage you to use a versioning pattern, but it does not lock you into it. |
I checked how Docusaurus does this but our scenario would be in a trunk based environment with git tags. And we would like to generate versions based on git tags on that branch. So the current version is generated from current trunk HEAD and all other versions live under |
If you have multiple branches, you can simply configure your host to deploy those multiple branches. I'm not sure it's possible to deploy a tag. If you deploy a specific git sha, you can just build it locally and upload the static files manually once and it will stay online forever. All this is outside the scope of Docusaurus. We just build static files, and there's a lot of different way to serve them. You can as well archive older deployments to |
Is this a bug report?
No, a feature request.
Have you read the Contributing Guidelines on issues?
Yes
Environment
Environment agnostic
Steps to Reproduce
Expected Behavior
I would like to be enabled to use docusaurus in a mode that gets the git tags of this repository and gets the documentation at that point of time. I am aware that using this version we would opt-out of changing the docs after setting the tag (without changing the tag), but this might be okay for some use cases.
Actual Behavior
Duplicately stored versions of the docs
Reproducible Demo
I have no demo, just a PR against
wix/detox
mimicing this behaviour. I would like to move this upstream to this repository in a well-tested way. See this PR: wix/Detox#582The text was updated successfully, but these errors were encountered: