From 3532ffc89bbf89ef7d2ac62d65b3683f588a9673 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 20 Jul 2021 02:16:54 +0200 Subject: [PATCH] Fix support for logos as urls (#1171) * Fix support for logos as urls Sphinx since 4.0 appears to support html_logo to also contain urls. As a consequence, the other themes in sphinx appear to be just using the new logo_url variable, and in this theme that fixes support for it, too. * Add backwards compatibility and add favicon_url Co-authored-by: Aaron Carlisle --- sphinx_rtd_theme/layout.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 35c8ddc40..e33c80067 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -42,7 +42,11 @@ {#- FAVICON #} {%- if favicon %} + {%- if sphinx_version_info < (4, 0) -%} + {%- else %} + + {%- endif %} {%- endif -%} {#- CANONICAL URL (deprecated) #} @@ -139,7 +143,11 @@ {#- Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #} + {%- if sphinx_version_info < (4, 0) -%} + {%- else %} + + {%- endif %} {%- endif %}