From d01b8f4201c71493741e8e27c7b6122e84383bcd Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Sat, 26 Oct 2013 16:33:27 -0700 Subject: [PATCH] Use local toc if it exists. --- sphinx_rtd_theme/layout.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" %}