
Some pages have no sub titles (the second level of titles or more). In this case, the title string "Contents" of page local TOC is completely meaningless and confusing to readers. It is nice if this title string is shown only when needed. This can be done by checking 'display_toc' variable in the template. [1] https://docs.openstack.org/ocata/networking-guide/intro.html Change-Id: I4803dd7712438eb2cd5fb6084e904bd8c0c98740
5 lines
160 B
HTML
5 lines
160 B
HTML
{%- if theme_sidebar_mode == 'toctree' and theme_display_toc and display_toc %}
|
|
<h5><a href="{{ pathto(master_doc) }}">Contents</a></h5>
|
|
{{ toc }}
|
|
{%- endif %}
|