diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2023-05-11 05:19:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 05:19:31 +0100 |
commit | ae206694e68bea074aca633ea0d32e9ed882a95f (patch) | |
tree | bb3ff9ac0e0cce4b6b31830d72c8af7f2c1a0452 /sphinx/builders/__init__.py | |
parent | 706f5f9cc83f1d62829bb18ad40bfa5e784e202c (diff) | |
download | sphinx-git-ae206694e68bea074aca633ea0d32e9ed882a95f.tar.gz |
html builder: Append CRC32 checksum to asset URIs (#11415)
Diffstat (limited to 'sphinx/builders/__init__.py')
-rw-r--r-- | sphinx/builders/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py index 852f25259..a5d5a1ef6 100644 --- a/sphinx/builders/__init__.py +++ b/sphinx/builders/__init__.py @@ -560,6 +560,9 @@ class Builder: with progress_message(__('preparing documents')): self.prepare_writing(docnames) + with progress_message(__('copying assets')): + self.copy_assets() + if self.parallel_ok: # number of subprocesses is parallel-1 because the main process # is busy loading doctrees and doing write_doc_serialized() @@ -620,6 +623,10 @@ class Builder: """A place where you can add logic before :meth:`write_doc` is run""" raise NotImplementedError + def copy_assets(self) -> None: + """Where assets (images, static files, etc) are copied before writing""" + pass + def write_doc(self, docname: str, doctree: nodes.document) -> None: """Where you actually write something to the filesystem.""" raise NotImplementedError |