From d19e3bd1d511cd748fbf552e456e4c7691ea18c1 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 8 Oct 2026 16:59:34 -0400 Subject: [PATCH 1/3] feat: Render the banner and version switcher in the theme, not with Apache'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) Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL --- docs/_templates/layout.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 5310a83dc..ad30f4dd5 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -29,7 +29,3 @@ {% endblock %} - -{% block version_options %} - -{% endblock %} From 3067ea7773d55351cb900fb8d63580ede58867b8 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 8 Oct 2026 16:59:34 -0400 Subject: [PATCH 2/3] feat: Build the language switcher from the languages theme option 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) Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL --- docs/_templates/layout.html | 9 --------- docs/conf.py | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index ad30f4dd5..07bded6c7 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -20,12 +20,3 @@
  • {% trans %}Data Registry{% endtrans %}
  • {% endblock %} - -{% block language_options %} - - - - - - -{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index afdefe0a5..a3bddcfbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -83,6 +83,7 @@ "analytics_id": "HTWZHRIZ", "display_version": True, "root_url": f"/profiles/{profile_identifier}" if profile_identifier else "", + "languages": {"en": "English", "es": "Español", "fr": "Français"}, "short_project": project.replace("Open Contracting Data Standard", "OCDS"), "copyright": copyright, "license_name": "Apache License 2.0", From 2467afa627881aeaccb779346370f198c74b5680 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 8 Oct 2026 20:28:26 -0400 Subject: [PATCH 3/3] build: Drop the settings that the theme now provides 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) Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL --- docs/_static/favicon-16x16.ico | Bin 1406 -> 0 bytes docs/_templates/footer.html | 5 ----- docs/conf.py | 9 +-------- script/update | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 docs/_static/favicon-16x16.ico delete mode 100644 docs/_templates/footer.html diff --git a/docs/_static/favicon-16x16.ico b/docs/_static/favicon-16x16.ico deleted file mode 100644 index 40159444df4205bf4b951f36bf7677998df5f7ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmeH{-A|HX7{-4H6n=$Tni`2f0z!tpydqc$scA-l#jCcJ9eZN6va+)_w>oOM)ojDQ z*E*?;YT`$!o2GNknsZ`SYW1J=(7C5=ZQjp*&+}Z@!M)wr!3`>La&i#2j!rEU0Cs_} zC>5mqjmj%Yc-?NQWf^Z(71cf;9)B&KfFG%$9#4vFgOn2bQi*D$jROdEp$cE0-wkxrpm(H^yt-xOy&A(R-bWo4pj?x`Fe~ zZJc-eF!%T2i1p(bxQF9m4Ev)Pna>AMy}Xa=)dN)V$ATxMy?KiI-80e?FR%^8DI9){ zZgdb^B98j~AlBix=spaRIUc8IVhHQ_2%4!OK?3W9_)jO$P7kB`I70E%7@C<;a%aaV zo0%lz(u)2hKHA%@@5~IMhwoJ+TGRF0< zn0~Hc`t=Rd@9!JMz3Fcz@V_UJSFA~mpefw`cM^SF%O0^`be2$Et}wE^iV~G_^scC) z9LOfqrHG1F`%{l1Wt9dMr8RQ6;!x8`p@SxEfgC#KDR=k+4aYL1r1;qi%H diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html deleted file mode 100644 index 91589f404..000000000 --- a/docs/_templates/footer.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "!footer.html" %} - -{% block extrafooter %} -{% trans %}Privacy notice{% endtrans %}. -{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index a3bddcfbb..ce755efa9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,7 +9,6 @@ from glob import glob from pathlib import Path -import standard_theme from docutils.nodes import make_id from ocds_babel.translate import translate from ocdskit.mapping_sheet import mapping_sheet @@ -44,8 +43,6 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = "standard_theme" # 'pydata_sphinx_theme' -html_theme_path = [standard_theme.get_html_theme_path()] -html_favicon = "_static/favicon-16x16.ico" html_static_path = ["_static"] html_css_files = ["custom.css"] html_js_files = ["renderjson.js", "script.js"] @@ -62,7 +59,7 @@ gettext_compact = False # `DOMAIN_PREFIX` from `config.mk`. gettext_domain_prefix = f"{profile_identifier}-" if profile_identifier else "" -locale_dirs = ["locale/", os.path.join(standard_theme.get_html_theme_path(), "locale")] +locale_dirs = ["locale/"] # We use single quotes for codes, which docutils will change to double quotes. # https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/utils/smartquotes.py smartquotes = False @@ -80,14 +77,10 @@ "analytics_id": "HTWZHRIZ", } html_theme_options = { - "analytics_id": "HTWZHRIZ", "display_version": True, "root_url": f"/profiles/{profile_identifier}" if profile_identifier else "", "languages": {"en": "English", "es": "Español", "fr": "Français"}, "short_project": project.replace("Open Contracting Data Standard", "OCDS"), - "copyright": copyright, - "license_name": "Apache License 2.0", - "license_url": f"{repository_url}/blob/HEAD/LICENSE", "repository_url": repository_url, } html_short_title = f"{html_theme_options['short_project']} v{release}" diff --git a/script/update b/script/update index d3590428e..3be6fa8ca 100755 --- a/script/update +++ b/script/update @@ -5,7 +5,7 @@ set -eu main() { mkdir -p script include tests - for f in .pre-commit-config.yaml .python-version Makefile common-requirements.in common-requirements.txt pyproject.toml .github/dependabot.yml .github/workflows/js.yml .github/workflows/shell.yml docs/_static/favicon-16x16.ico include/common.mk include/prologue.mk script/diff script/update tests/conftest.py tests/test_common.py theme-requirements.txt; do + for f in .pre-commit-config.yaml .python-version Makefile common-requirements.in common-requirements.txt pyproject.toml .github/dependabot.yml .github/workflows/js.yml .github/workflows/shell.yml include/common.mk include/prologue.mk script/diff script/update tests/conftest.py tests/test_common.py theme-requirements.txt; do curl -sS -o $f https://raw.githubusercontent.com/open-contracting/standard_profile_template/refs/heads/latest/$f done