diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html index 378643bc44..a1b9ef9c35 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html @@ -37,7 +37,9 @@
{%- endfor %} - {# add the rtd flyout in the sidebar if existing #} - + {# add the rtd flyout in the sidebar if building on rtd #} + {% if READTHEDOCS %} + + {% endif %} {% endif %} {% endblock docs_sidebar %} diff --git a/tests/test_build/sidebar_subpage.html b/tests/test_build/sidebar_subpage.html index 54a4a2e495..fb97a037f5 100644 --- a/tests/test_build/sidebar_subpage.html +++ b/tests/test_build/sidebar_subpage.html @@ -69,6 +69,4 @@ -