From 572d534692b00161e7dae78db43ecaed9eb6de28 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:16:40 -0700 Subject: [PATCH 1/4] Restore attached flyout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sphinx-rtd-theme 3.0.0 changed the default behavior to hide this flyout in favor of the Read the Docs flyout which was enabled by default along with the 3.0.0 release.¹ I'll plan to disable the RTD flyout on the RTD dashboard when this commit makes its way into RTD-hosted builds. ¹ https://about.readthedocs.com/blog/2024/07/addons-by-default/ --- doc/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index a81120b..42257bc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -48,3 +48,7 @@ # a list of builtin themes. # html_theme = 'nextstrain-sphinx-theme' + +html_theme_options = { + 'flyout_display': 'attached', +} \ No newline at end of file From 8866eba5ebde40149eaa5707a78402a44fc84c0e Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:49:49 -0700 Subject: [PATCH 2/4] fixup! Restore attached flyout --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 42257bc..3a2ab1f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -51,4 +51,4 @@ html_theme_options = { 'flyout_display': 'attached', -} \ No newline at end of file +} From f9e97c383ca2dc11d6f85205d2bf911d5ba11c5a Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:50:00 -0700 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=9A=A7=20add=20section=20for=20Read?= =?UTF-8?q?=20the=20Docs=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 3a2ab1f..5ab6318 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -52,3 +52,14 @@ html_theme_options = { 'flyout_display': 'attached', } + +# -- Read the Docs configuration --------------------------------------------- + +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True From 1c874d188788e3779b873b5f4aac3ecb681469bb Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:55:05 -0700 Subject: [PATCH 4/4] Remove script block on RTD JS injection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RTD no longer adds its own JS on new builds as of October 7, 2024.¹ ¹ https://about.readthedocs.com/blog/2024/07/addons-by-default/ --- lib/nextstrain/sphinx/theme/layout.html | 46 ------------------------- 1 file changed, 46 deletions(-) diff --git a/lib/nextstrain/sphinx/theme/layout.html b/lib/nextstrain/sphinx/theme/layout.html index a5c9db2..edec100 100644 --- a/lib/nextstrain/sphinx/theme/layout.html +++ b/lib/nextstrain/sphinx/theme/layout.html @@ -69,49 +69,3 @@ {% include "searchbox.html" %} {% endblock %} - - -{% block extrabody %} - - -{% endblock %}