diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index ae616f60..e78f544e 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -102,7 +102,10 @@
{% set toctree = toctree(maxdepth=2, collapse=False) %} - {% if toctree %} + {% if not next and not prev %} + + {{ toc }} + {% elif toctree %} {{ toctree }} {% else %} {{ toc }}