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

Commit48e2891

Browse files
authored
Merge pull request#26493 from AA-Turner/sphinx-7-1-checksums
Disable ``add_html_cache_busting`` on Sphinx 7.1+
2 parentseb5ae31 +a01fbae commit48e2891

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎doc/conf.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
importsys
2020
fromurllib.parseimporturlsplit,urlunsplit
2121
importwarnings
22+
23+
importsphinx
2224
importyaml
2325

2426
importmatplotlib
@@ -408,6 +410,9 @@ def add_html_cache_busting(app, pagename, templatename, context, doctree):
408410
This adds the Matplotlib version as a query to the link reference in the
409411
HTML, if the path is not absolute (i.e., it comes from the `_static`
410412
directory) and doesn't already have a query.
413+
414+
.. note:: Sphinx 7.1 provides asset checksums; so this hook only runs on
415+
Sphinx 7.0 and earlier.
411416
"""
412417
fromsphinx.builders.htmlimportStylesheet,JavaScript
413418

@@ -785,4 +790,5 @@ def setup(app):
785790
bld_type='rel'
786791
app.add_config_value('skip_sub_dirs',0,'')
787792
app.add_config_value('releaselevel',bld_type,'env')
788-
app.connect('html-page-context',add_html_cache_busting,priority=1000)
793+
ifsphinx.version_info[:2]< (7,1):
794+
app.connect('html-page-context',add_html_cache_busting,priority=1000)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp