Skip to content

Master - #143

Closed
arokem wants to merge 2 commits into
mainfrom
master
Closed

Master#143
arokem wants to merge 2 commits into
mainfrom
master

Conversation

@arokem

@arokem arokem commented Sep 10, 2026

Copy link
Copy Markdown
Member

No description provided.

skoudoro and others added 2 commits September 9, 2026 16:18
The version switcher marked a synthetic `{"version": "stable"}` entry as
preferred. pydata-sphinx-theme gates the warning banner on

    const i = t(o) && t(s);          // t = /^[v\d]/ + semver regex
    if (i && n(o, s, "=")) return;   // suppress banner

where `s` is the preferred entry's version. `t("stable")` is false, so the
suppression branch was unreachable and every page rendered
"This is documentation for version 0.5.0. [Switch to stable version]" —
including /stable/ itself, whose button linked back to the current page.

Drop the pseudo-version entry: the newest release is now the preferred one
and is served from the /stable/ alias, named "0.5.0 (stable)". Older
releases keep their own versioned URL, so they correctly report "an old
version (X.Y.Z)" instead of a bare "version X.Y.Z".

Also in the release workflow:

- Read switcher.json from the gh-pages worktree instead of curl-ing the
  published site, which is served through a CDN cache and could hand the
  build a stale copy.
- Only copy to stable/ when the tag is the newest release, so a backport
  tag cannot demote a newer one.
- Add a workflow_dispatch job that rebuilds switcher.json from the version
  folders present on gh-pages, to fix the live site without cutting a
  release. The folder list is used rather than git tags because tags
  predating the versioned docs have no folder to link to.

Closes #141
fix(docs): stop the version banner showing on the stable docs
@arokem

arokem commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Actually, I will close this and open a cleaner version of this without the merge commit by cherry-picking the one relevant commit.

@arokem arokem closed this Sep 10, 2026
@arokem
arokem deleted the master branch September 10, 2026 13:16
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.

2 participants