From: Stan Ulbrych Date: Fri, 3 Apr 2026 15:19:30 +0000 (+0100) Subject: gh-125895: Fix static asset location for `sphinx-notfound-page` (#147984) X-Git-Tag: v3.15.0a8~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ab6d958a0e4aa322aaf96994c43cd637496be6;p=thirdparty%2FPython%2Fcpython.git gh-125895: Fix static asset location for `sphinx-notfound-page` (#147984) --- diff --git a/Doc/conf.py b/Doc/conf.py index 07e0d113a24c..f021c9eabe4d 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -572,6 +572,17 @@ refcount_file = 'data/refcounts.dat' 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 # -------------------------------