Repository navigation
source version dropdown from a shared, dynamically-generated versions.js - #312
Merged
Merged
Conversation
On-behalf-of: @SAP christoph.mewes@sap.com Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
On-behalf-of: @SAP christoph.mewes@sap.com Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
ntnn
approved these changes
Nov 10, 2026
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.
Since each feature release of PM gets its own branch in this repo, changes that affect the entire website (i.e. across releases) have to made once in each release branch.
For example, adding 26.10 to the version dropdown required 1 PR to main and then 6 backports. The number of backports will just grow over time as more releases are made.
To tackle this, this PR proposes to make the version dropdown dynamic.
versions.jsbased off the deployed documentations (i.e. directories in thegh-pagesbranch). This file lives at the website's root, not within any specific release (i.e. not/release-26.10/versions.js).<script>tag to initialize the dropdown. If loading fails, the dropdown falls back to just showing the current version shown (based on the current URL) andmain).This way we reduce our churn in the
gh-pagesbranch and have to maintain less stuff by hand. There is a drawback in that the dropdown is now JS-based, but the only good workaround for that is requiring re-deploys for each release branch regularly. Could also work, open to suggestions.Like, the alternative is that we build the dropdown during the pages-deployment phase, but this means when a new feature release is made, we need to rebuild the docs for each branch so they can detect the new release. Can be done, we could also just for good measure redeploy the website every day.
part of #315