Merge pull request #367 from snide/fix-singlehtml-missing-doctree

Display the toctree conditionally
This commit is contained in:
Anthony 2017-03-03 11:59:23 -08:00 committed by GitHub
commit 15f8d32295

View File

@ -121,12 +121,14 @@
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %}
{% set toctree = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
{% if toctree %}
{{ toctree }}
{% else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% if display_toc %}
{% set toctree = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
{% if toctree %}
{{ toctree }}
{% else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% endif %}
{% endif %}
{% endblock %}
</div>