summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-18 21:38:12 +0900
committerGitHub <noreply@github.com>2019-06-18 21:38:12 +0900
commit288bf231e68e327876510c9b39b16b7512718373 (patch)
tree184f59924565920fdccb32ca4549a570514f356e
parent3047bd211ff3de173d7af817d84118c8ad776772 (diff)
parent83c59bba6d5a7edcfb139a8218f6b3aa9a35c780 (diff)
downloadsphinx-git-288bf231e68e327876510c9b39b16b7512718373.tar.gz
Merge pull request #6501 from tk0miya/6499_html_logo_never_updated
Fix #6499: html: Sphinx never updates a copy of html_logo
-rw-r--r--CHANGES2
-rw-r--r--sphinx/builders/html.py14
2 files changed, 6 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 6e38020e8..f09413c62 100644
--- a/CHANGES
+++ b/CHANGES
@@ -30,6 +30,8 @@ Bugs fixed
----------
* py domain: duplicated warning does not point the location of source code
+* #6499: html: Sphinx never updates a copy of :confval:`html_logo` even if
+ original file has changed
* #1125: html theme: scrollbar is hard to see on classic theme and macOS
* #5502: linkcheck: Consider HTTP 503 response as not an error
* #6439: Make generated download links reproducible
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index c8d330d2d..147ac14a9 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -787,17 +787,11 @@ class StandaloneHTMLBuilder(Builder):
context=ctx, renderer=self.templates)
# copy logo and favicon files if not already in static path
if self.config.html_logo:
- logobase = path.basename(self.config.html_logo)
- logotarget = path.join(self.outdir, '_static', logobase)
- if not path.isfile(logotarget):
- copyfile(path.join(self.confdir, self.config.html_logo),
- logotarget)
+ entry = path.join(self.confdir, self.config.html_logo)
+ copy_asset(entry, path.join(self.outdir, '_static'))
if self.config.html_favicon:
- iconbase = path.basename(self.config.html_favicon)
- icontarget = path.join(self.outdir, '_static', iconbase)
- if not path.isfile(icontarget):
- copyfile(path.join(self.confdir, self.config.html_favicon),
- icontarget)
+ entry = path.join(self.confdir, self.config.html_favicon)
+ copy_asset(entry, path.join(self.outdir, '_static'))
logger.info(__('done'))
except OSError as err:
logger.warning(__('cannot copy static file %r'), err)