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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Bugs fixed
* #11278: autodoc: Fix rendering of :class:`functools.singledispatchmethod`
combined with :func:`@classmethod <classmethod>`.
Patch by Bénédikt Tran.
* #11894: Do not add checksums to css files if building using the htmlhelp builder.
Patch by mkay.

Testing
-------
Expand Down
4 changes: 3 additions & 1 deletion sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,9 @@ def css_tag(css: _CascadingStyleSheet) -> str:
if value is not None]
uri = pathto(os.fspath(css.filename), resource=True)
# the EPUB format does not allow the use of query components
if self.name != 'epub':
# 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