Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not add checksums to css files if building using the htmlhelp builder #11894

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into feature-skip-checksum-for-htmlhelp
# Conflicts:
#	sphinx/builders/html/__init__.py
  • Loading branch information
AA-Turner committed Jan 18, 2024
commit bac1bfc7a1e36c9a65cd42855e53eeacc7c3e35e
7 changes: 5 additions & 2 deletions sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,11 @@ def css_tag(css: _CascadingStyleSheet) -> str:
for key, value in css.attributes.items()
if value is not None]
uri = pathto(os.fspath(css.filename), resource=True)
if checksum := _file_checksum(outdir, css.filename):
if self.app.builder.name != 'htmlhelp':
# the EPUB format does not allow the use of query components
# the Windows help compiler requires that css links
# don't have a query component
if self.name not in {'epub', 'htmlhelp'}:
if checksum := _file_checksum(outdir, css.filename):
uri += f'?v={checksum}'
return f'<link {" ".join(sorted(attrs))} href="{uri}" />'

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.