diff --git a/src/furo/__init__.py b/src/furo/__init__.py index 97a7cfbc..f7ad5a8d 100644 --- a/src/furo/__init__.py +++ b/src/furo/__init__.py @@ -156,6 +156,11 @@ def _asset_hash(path: str) -> str: def _add_asset_hashes(static: List[str], add_digest_to: List[str]) -> None: + if sphinx.version_info >= (7, 1): + # https://github.com/sphinx-doc/sphinx/pull/11415 added the relevant + # functionality to Sphinx, so we don't need to do anything. + return + for asset in add_digest_to: index = static.index("_static/" + asset) static[index].filename = _asset_hash(asset) # type: ignore