https://github.com/python/cpython/commit/80ab6d958a0e4aa322aaf96994c43cd637496be6
commit: 80ab6d958a0e4aa322aaf96994c43cd637496be6
branch: main
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-04-03T16:19:30+01:00
summary:
gh-125895: Fix static asset location for `sphinx-notfound-page` (#147984)
files:
M Doc/conf.py
diff --git a/Doc/conf.py b/Doc/conf.py
index 07e0d113a24c10..f021c9eabe4dda 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -572,6 +572,17 @@
stable_abi_file = 'data/stable_abi.dat'
threadsafety_file = 'data/threadsafety.dat'
+# Options for notfound.extension
+# -------------------------------
+
+if not os.getenv("READTHEDOCS"):
+ if language_code:
+ notfound_urls_prefix = (
+ f'/{language_code.replace("_", "-").lower()}/{version}/'
+ )
+ else:
+ notfound_urls_prefix = f'/{version}/'
+
# Options for sphinxext-opengraph
# -------------------------------
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]