Skip to content

Docs: GitHub header shows latest release even when viewing older RTD versions #776

Description

@jepegit

Context

On Read the Docs, when you select an older version (e.g. v2.0.0) via the RTD version switcher, the docs content is correct for that tag, but the top-right GitHub repository card still shows the latest GitHub release tag (currently v2.1.0), plus live stars/forks.

Bottom-right RTD version control correctly shows v2.0.0.

Why

Zensical / Material-style themes load repository metadata (stars, forks, latest release) from the live GitHub API at page view time. That is independent of the Git ref RTD used to build the page. So every published docs version shows the same “latest release” badge in the header.

Config today only sets repo_url / repo_name in zensical.toml — there is no per-build version string for that widget.

Acceptance / options

Pick one when we care enough:

  1. Document as expected (wontfix / note in dev_docs.md) — RTD switcher is source of truth for which docs you’re on.
  2. Hide the release tag in the repo card if the theme allows (keep stars/forks, drop version).
  3. Override the header partial so the badge uses the RTD/build version (or is omitted on non-latest builds).

Not a content bug in the v2.0.0 build itself.

Refs

Noticed while setting RTD stable/latest after retiring v2-docs-stable (#768).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions