-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Ability to render documentation versions from git branch or tag #341
Comments
@QingWei-Li thanks for such a great tool. I was wondering you have think about providing this support and even whether or not its possible. I was looking at |
This would be a very valuable feature. |
Btw, this could be solved by github itself. I created this ticket: |
This can work theoretically:
|
Given that there hasn't been much movement on this, perhaps there's an easier way to handle versioning? I think versioning is very important for any full featured documentation set. Docusaurus has a very reasonable versioning system. Here the file layout would read:
It is a breaking change, but I think it could prove quite manageable. |
This is something I really want for our next version. |
@anikethsaha Amazing. Please let me know the best way to contribute! I'd be happy to help along the way with a little direction from someone closer to the project. |
Glad to hear 💯 Currently I have very rough approach for this but I am open to new approaches. So it would be great if you can comment your approach if you have in the roadmap issue. And also, there will be many ways to contribute in this. just keep an eye in it. Everything will be discussed in issues and then it will be implemented |
@anikethsaha It's been a while, does docsify still have plans to this? |
The sentiment is that this would be nice, but it has not been implemented yet. Also, we need a plan. How do you imagine it could work? Perhaps a new option configures alternate versions of the docs? For example: window.$docsify = {
versions: {
"v1": "path/to/v1",
"v2": "path/to/v2",
"rc": "path/to/rc",
"nightly": "path/to/nightly",
},
} then these effectively become base paths that switch which folders file are read from. The upside is this is easy, and works without any version control system. The downside is that there will be duplication from version to version across the folders, and with this option there is no automation (but we need something that can be done manually before we automate it with a CLI). So people with version control will have a growing repo for every version they publish. Another idea could be to make a plugin that loads content from GitHub based on the given tag: window.$docsify = {
repo: "https://github.com/docsifyjs/docsify",
basePath: "https://raw.githubusercontent.com/docsifyjs/docsify/main/README.md"
plugins: [GitHubVersionsPlugin(['v4.0.0', 'v4.1.1'])],
} then the plugin would take your repo URL and look for the tags There can also be an option to have it automatically fetch the list of versions. This way people can customize which version to show, or automatically show all. Maybe we provide both types of options, because some people may not use a git or GitHub, and may not even use version control, but would still like to make versions by hand like |
Is it something like this? The source sode -> https://github.com/keiyin-wong/docsify-version-plugin The example website -> https://keiyin-wong.github.io/docsify-version-plugin-doc-example/docs/#/ |
It would be awesome to have options to:
something like this:
The text was updated successfully, but these errors were encountered: