You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dropdown in the docs will improve the user experience and ease the understanding which version of the docs are currently viewed (see #4537).
It also allows to switch between multiple versions but this needs more changes since the docs for all versions need to be published. Dropdown selection for versions is used very often in documentation (e.g. https://docs.python.org/3.14/) and the design is inspired by ROS 2
How Has This Been Tested?
By running the commands in a devcontainer that are provided in the docs subfolder. Browsing the docs was tested with Firefox under Linux.
The remaining issue is that the docs for different versions need to be created and published. Currently there are only docs for 5.12 and latest. But I couldn't find where this is done. Or is this a manual task? 🤷
The remaining issue is that the docs for different versions need to be created and published. Currently there are only docs for 5.12 and latest. But I couldn't find where this is done. Or is this a manual task? 🤷
v5.12 I manually ported back into the main branch, but I think we can automate this at publishing minor/major versions, @gep13 could probably help us with some suggestions
Currently the website uses the gh-pages branch in this repository for GitHub Pages and I think we could use an approach as described here. This approach might also work by adapting the code in the PublishDocs.cs but I assume this might be a bit more complex than using the existing features offered by GitHub workflow.
The workflow for the default branch would build the HTML files for each commit and place them into e.g. a /dev folder for the latest docs
Once a release is created, the main branch gets forked and the workflow detects that it is a release/branch by matching github.ref_name against ^[0-9]+\.[0-9]+\.[0-9]+$ and thus publishes to e.g. the /v6.0.0 folder now. This would also allow fixes to docs in the release branch afterwards since it would just update the files inside that folder - if this is desired at all because normally a release is frozen. Otherwise it is run on a tag (which seems to be the case for 99% of the releases of GitVersion) and forget about fixing docs for released versions.
The drawback is that you cannot link to the v6.0.1 release from the v6.0.0 docs because that would require that you always update the Navbar file in all existing releases for each new release but it will provide links to older and the latest (/dev) release. From there you can reach all other releases. (If this is important I guess it could be solved by using a single Navbar file for all version folders)
The gh-pages branch is no longer needed. Otherwise it should be possible to use an similar approach and push the folders to the branch and trigger a workflow to deploy the pages from there.
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
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 provides a dropdown in the docs on the right side to select the desired docs for a specific version.
Related Issue
Resolves #4537
Motivation and Context
A dropdown in the docs will improve the user experience and ease the understanding which version of the docs are currently viewed (see #4537).
It also allows to switch between multiple versions but this needs more changes since the docs for all versions need to be published. Dropdown selection for versions is used very often in documentation (e.g. https://docs.python.org/3.14/) and the design is inspired by ROS 2
How Has This Been Tested?
By running the commands in a devcontainer that are provided in the docs subfolder. Browsing the docs was tested with Firefox under Linux.
Screenshots (if appropriate):
Checklist: