Skip to content

Add version banner to docs#1355

Open
AdrianDAlessandro wants to merge 6 commits into
mainfrom
docs-version-banner
Open

Add version banner to docs#1355
AdrianDAlessandro wants to merge 6 commits into
mainfrom
docs-version-banner

Conversation

@AdrianDAlessandro

Copy link
Copy Markdown
Collaborator

Description

This PR adds a banner to the docs as a warning for all non-stable versions of the docs. It includes an amber banner for the dev version and a red banner for old versions. There is no banner for the stable version.

This is achieved by including a header.hbs file, which is a html snippet that MdBook inserts into the generated docs. There is some CSS for stying the banner and some JavaScript to dynamically determine the contents of the banner depending on the version of the docs (determined by the url path). I relied on LLM agents for much of this component.

I have added a stable version of the docs that is built alongside the "old" docs. This is simply a copy of the most recent release. One drawback is that the release corresponding to this stable one (currently v2.1.0) includes the red banner, whereas the stable one does not. This is slightly misleading.

I have also developed a version selector widget, but I have put that in a separate PR because it includes some more executive decisions that I have made about the docs.

Fixes #1188

Assisted-by: Claude Sonnet 4.6

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc
  • Update release notes for the latest release if this PR adds a new feature or fixes a bug
    present in the previous release

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.80%. Comparing base (934b359) to head (18a7683).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1355   +/-   ##
=======================================
  Coverage   88.80%   88.80%           
=======================================
  Files          58       58           
  Lines        8516     8516           
  Branches     8516     8516           
=======================================
  Hits         7563     7563           
  Misses        640      640           
  Partials      313      313           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment was marked as resolved.

AdrianDAlessandro and others added 2 commits June 18, 2026 15:32
Assisted-by: Copilot

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Add banner to top of "old docs" telling users it is an old version of the documentation

2 participants