2017-06-17 23:24:27 +00:00
|
|
|
<div class="sidebar-block">
|
|
|
|
<div class="sidebar-toc">
|
2017-06-30 15:41:58 +00:00
|
|
|
{# Restrict the sidebar toc depth to two levels while generating command usage pages.
|
|
|
|
This avoids superfluous entries for each "Description" and "Examples" heading. #}
|
|
|
|
{% if pagename.startswith("usage/") and pagename not in (
|
|
|
|
"usage/general", "usage/help", "usage/debug", "usage/notes",
|
|
|
|
) %}
|
|
|
|
{% set maxdepth = 2 %}
|
|
|
|
{% else %}
|
|
|
|
{% set maxdepth = 3 %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set toctree = toctree(maxdepth=maxdepth, collapse=True) %}
|
2017-06-17 23:24:27 +00:00
|
|
|
{% if toctree %}
|
|
|
|
{{ toctree }}
|
|
|
|
{% else %}
|
|
|
|
{{ toc }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|