Skip to content

Commit

Permalink
Merge pull request #8749 from tk0miya/8737_invalid_logo_is_shown
Browse files Browse the repository at this point in the history
Fix #8737: html: broken img tag is appeared when html_logo not set
  • Loading branch information
tk0miya committed Jan 25, 2021
2 parents eaa14bb + 03629b1 commit 934dd62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,14 +1162,14 @@ def setup_resource_paths(app: Sphinx, pagename: str, templatename: str,

# favicon_url
favicon = context.get('favicon')
if not isurl(favicon):
if favicon and not isurl(favicon):
context['favicon_url'] = pathto('_static/' + favicon, resource=True)
else:
context['favicon_url'] = favicon

# logo_url
logo = context.get('logo')
if not isurl(logo):
if logo and not isurl(logo):
context['logo_url'] = pathto('_static/' + logo, resource=True)
else:
context['logo_url'] = logo
Expand Down

0 comments on commit 934dd62

Please sign in to comment.