Skip to content

source version dropdown from a shared, dynamically-generated versions.js - #312

Merged
xrstf merged 2 commits into
platform-mesh:mainfrom
xrstf:auto-version
Nov 10, 2026
Merged

xrstf merged 2 commits into
platform-mesh:mainfrom
xrstf:auto-version

Conversation

@xrstf

@xrstf xrstf commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • We generate a versions.js based off the deployed documentations (i.e. directories in the gh-pages branch). This file lives at the website's root, not within any specific release (i.e. not /release-26.10/versions.js).
  • Vitepress is configured to include this JS file via a <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) and main).

This way we reduce our churn in the gh-pages branch 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

On-behalf-of: @SAP christoph.mewes@sap.com

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
@xrstf
xrstf requested review from a team as code owners November 9, 2026 15:37
Comment thread .github/workflows/release.yml Fixed
On-behalf-of: @SAP christoph.mewes@sap.com

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
@xrstf
xrstf merged commit 573de33 into platform-mesh:main Nov 10, 2026
5 checks passed
xrstf added a commit that referenced this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants