Repository navigation
Render the banner, version switcher and language switcher in the theme - #1755
Merged
Merged
Conversation
jpmckinney
force-pushed
the
versions-json
branch
3 times, most recently
from
October 8, 2026 21:05
1d39c1e to
6322928
Compare
jpmckinney
force-pushed
the
versions-json
branch
from
October 9, 2026 00:29
6322928 to
53bf8b0
Compare
…pache's server-side includes The theme reads a versions.json served next to the documentation root, which any host can serve, in place of the `$BANNER` and version-options includes that Apache's mod_include resolves at request time. `versions_url` defaults to it, so only the block goes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL (cherry picked from commit d19e3bd)
The option also emits relative links as the no-JavaScript fallback, in place of a form posted to
`{root}/{version}/switcher`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL
(cherry picked from commit 3067ea7)
The theme registers itself and its catalogs through the `sphinx.html_themes` entry point, and defaults the options that every documentation repository set alike, ships the favicon, and adds the privacy notice to its footer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL (cherry picked from commit 2467afa)
jpmckinney
force-pushed
the
versions-json
branch
from
October 9, 2026 00:33
53bf8b0 to
2613a6b
Compare
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.
Phase 1 of open-contracting/deploy#266 (comment), for the last of the six documentation repositories.
The same three commits as #1761, cherry-picked onto
1.2-devso that 1.2 doesn't ship without them. #1761 is the one that reaches the live documentation.version_optionsblock, so that the banner and version switcher no longer use Apache's server-side includes.versions_urldefaults to../versions.jsonin the theme, so nothing is set here.languagesand delete thelanguage_optionsblock. The language switcher's no-JavaScript fallback is now relative links, rather than a form posted to/{version}/switcher.html_theme_path, the theme'slocale_dirsentry,html_favicon,analytics_id,copyright,license_name,license_url, and thefooter.htmloverride. The theme registers itself and its catalogs through thesphinx.html_themesentry point.The resulting
html_theme_optionsmatchesstandard_profile_template@latestapart fromdisplay_versionand the three languages./1.0/is untouched: it keeps its server-side includes, and stays in the rootversions.json, so the switcher on/latest/and/1.1/still offers it.1.1is deliberately absent fromversions.json, so/1.1/shows no banner, as today.The
language_optionsblock wrapped the languages in<optgroup label="Supported translations">, which a flatlanguagesdict can't express. It has labelled every option since Italian was removed in 3108313 (2021-05-08), so nothing is distinguished by it today. open-contracting/standard-development-handbook#295 tracks that, along with the procedure that still tells you to edit the deleted block.Checked: all three languages build with no
<!--#include, andpytest -W errorpasses. The favicon, privacy notice,data-site="HTWZHRIZ"and the licence all still render, from the theme. The switcher placeholders are translated for the first time —Versión/IdiomaandVersion/Langue— because the theme's catalogs ship now.https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL
🤖 Generated with Claude Code