From f6e3b6ac7e931ac421dc88c91690e89ef0ce472f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 Jun 2021 10:15:10 +0200 Subject: [PATCH 1/2] 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. --- sphinx_rtd_theme/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 2ca84a69a..20d2aae54 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -131,7 +131,7 @@ {#- Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #} - + {%- endif %} From 380ef5e2405da2bbf7ad483cbad40a32bcc8e9d7 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 17 Jul 2021 12:55:31 -0400 Subject: [PATCH 2/2] Add backwards compatibility and add favicon_url --- 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 20d2aae54..997f08c97 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -36,7 +36,11 @@ {#- FAVICON #} {%- if favicon %} + {%- if sphinx_version_info < (4, 0) -%} + {%- else %} + + {%- endif %} {%- endif -%} {#- CANONICAL URL (deprecated) #} @@ -131,7 +135,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 %}