mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
address issue #1352 -- make sure to check for the actual file stored in config.html_logo.
This commit is contained in:
parent
8ef6226e31
commit
3706ed02ac
@ -496,22 +496,25 @@ that use Sphinx' HTMLWriter class.
|
||||
|
||||
.. confval:: html_logo
|
||||
|
||||
If given, this must be the name of an image file that is the logo of the
|
||||
docs. It is placed at the top of the sidebar; its width should therefore not
|
||||
exceed 200 pixels. Default: ``None``.
|
||||
If given, this must be the name of an image file (path relative to the
|
||||
``conf.py`` file) that is the logo of the docs. It is placed at the top of
|
||||
the sidebar; its width should therefore not exceed 200 pixels. Default:
|
||||
``None``.
|
||||
|
||||
.. versionadded:: 0.4.1
|
||||
The image file will be copied to the ``_static`` directory of the output
|
||||
HTML, so an already existing file with that name will be overwritten.
|
||||
HTML, but only if the file does not already exist there.
|
||||
|
||||
.. confval:: html_favicon
|
||||
|
||||
If given, this must be the name of an image file (within the static path, see
|
||||
below) that is the favicon of the docs. Modern browsers use this as icon for
|
||||
tabs, windows and bookmarks. It should be a Windows-style icon file
|
||||
(``.ico``), which is 16x16 or 32x32 pixels large. Default: ``None``.
|
||||
If given, this must be the name of an image file (path relative to the
|
||||
``conf.py`` file) that is the favicon of the docs. Modern browsers use this
|
||||
as icon for tabs, windows and bookmarks. It should be a Windows-style icon
|
||||
file (``.ico``), which is 16x16 or 32x32 pixels large. Default: ``None``.
|
||||
|
||||
.. versionadded:: 0.4
|
||||
The image file will be copied to the ``_static`` directory of the output
|
||||
HTML, but only if the file does not already exist there.
|
||||
|
||||
.. confval:: html_static_path
|
||||
|
||||
|
@ -597,8 +597,8 @@ class StandaloneHTMLBuilder(Builder):
|
||||
if self.config.html_logo:
|
||||
logobase = path.basename(self.config.html_logo)
|
||||
logotarget = path.join(self.outdir, '_static', logobase)
|
||||
if not path.isfile(logobase):
|
||||
self.warn('logo file %r does not exist' % logobase)
|
||||
if not path.isfile(path.realpath(self.config.html_logo)):
|
||||
self.warn('logo file %r does not exist' % self.config.html_logo)
|
||||
elif not path.isfile(logotarget):
|
||||
copyfile(path.join(self.confdir, self.config.html_logo),
|
||||
logotarget)
|
||||
|
Loading…
Reference in New Issue
Block a user