[3.13] gh-125895: Fix static asset location for sphinx-notfound-page (GH-147984) (#148041)

(cherry picked from commit 80ab6d958a)

Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
Miss Islington (bot) 2026-04-03 17:40:32 +02:00 committed by GitHub
parent 2a00d94fb2
commit 1a188aa082
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -561,6 +561,17 @@
refcount_file = 'data/refcounts.dat'
stable_abi_file = 'data/stable_abi.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
# -------------------------------