Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef296e2

Browse files
authored
Do not append asset hashes on Sphinx 7.1+
The relevant functionality has been added to Sphinx natively.
1 parent4dbc102 commitef296e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎python_docs_theme/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
frompathlibimportPath
55
fromtypingimportAny,Dict,List
66

7+
importsphinx
78
importsphinx.application
89
fromsphinx.builders.htmlimportStandaloneHTMLBuilder
910

@@ -20,6 +21,11 @@ def _asset_hash(path: str) -> str:
2021

2122

2223
def_add_asset_hashes(static:List[str],add_digest_to:List[str])->None:
24+
ifsphinx.version_info>= (7,1):
25+
# https://github.com/sphinx-doc/sphinx/pull/11415 added the relevant
26+
# functionality to Sphinx, so we don't need to do anything.
27+
return
28+
2329
forassetinadd_digest_to:
2430
index=static.index(asset)
2531
static[index].filename=_asset_hash(asset)# type: ignore

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp