Repository navigation
Conversation
This branch has not been deployed
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.
Adds a Read-the-Docs-style version dropdown to every page on docs.fenicsproject.org, including old builds and Doxygen pages, without rebuilding anything.
At deploy time,
website.ymlnow:make_versions.py, which writes<project>/versions.jsonfrom the version folders (mainand tags) and marks the newest release as stableinject_switcher.py, which adds one<script>line before</body>in each HTML pageinject_switcher.py --verify ., which fails the job if any published file differs from the repo by more than that lineOnly the Pages artifact is modified; nothing is committed back.
The dropdown opens the same page in the selected version. If that page doesn't exist there, it falls back to the nearest parent page, then to
python/orcpp/. dolfinx Doxygen pages map betweencpp/(v0.1–v0.3) andcpp/doxygen/(v0.4+). Old releases also show a dismissible "newer release available" banner./_fenics/version-switcher.js,/versions.jsonand/<project>/versions.json.Tested on a full copy of the site:
Follow-up: generate the README/index version list from
versions.jsonand removemark_old_docs.py.🤖 Generated with Claude Code