From b40420daae7dab635d6818ea874e15c005a6dadd Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Thu, 7 Nov 2013 13:57:30 -0800 Subject: [PATCH] Use local toc for single page docs --- sphinx_rtd_theme/layout.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }}