Skip to content

Commit 8ed868d

Browse files
StanFromIrelandmiss-islington
authored andcommitted
gh-125895: Fix static asset location for sphinx-notfound-page (GH-147984)
(cherry picked from commit 80ab6d9) Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 3d49e49 commit 8ed868d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,17 @@
570570
stable_abi_file = 'data/stable_abi.dat'
571571
threadsafety_file = 'data/threadsafety.dat'
572572

573+
# Options for notfound.extension
574+
# -------------------------------
575+
576+
if not os.getenv("READTHEDOCS"):
577+
if language_code:
578+
notfound_urls_prefix = (
579+
f'/{language_code.replace("_", "-").lower()}/{version}/'
580+
)
581+
else:
582+
notfound_urls_prefix = f'/{version}/'
583+
573584
# Options for sphinxext-opengraph
574585
# -------------------------------
575586

0 commit comments

Comments
 (0)