diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 351b08be..6f84f4fb 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -95,7 +95,12 @@
- {{ toctree(maxdepth=2, collapse=False) }} + {% set toctree = toctree(maxdepth=2, collapse=False) %} + {% if toctree %} + {{ toctree }} + {% else %} + {{ toc }} + {% endif %}
{% include "versions.html" %}