From 398636c36667933483bdfd602b20d5cf92fcea5b Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Fri, 3 Mar 2017 11:38:10 -0800 Subject: [PATCH] Display the toctree conditionally The `singlehtml` builder for sphinx doesn't produce a toctree, and was throwing an exception on these builds. This makes use of the `display_toc` context variable, used back to at least `sphinx==1.1`. --- sphinx_rtd_theme/layout.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index a0e62e1f..a76bafad 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -121,12 +121,14 @@