Do not display title string of page local TOC
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
This commit is contained in:
parent
725ec60d9c
commit
d9bc11a979
@ -1,4 +1,4 @@
|
||||
{%- if theme_sidebar_mode == 'toctree' and theme_display_toc %}
|
||||
{%- if theme_sidebar_mode == 'toctree' and theme_display_toc and display_toc %}
|
||||
<h5><a href="{{ pathto(master_doc) }}">Contents</a></h5>
|
||||
{{ toc }}
|
||||
{%- endif %}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The title "Contents" of the page local TOC is now displayed
|
||||
only when a page has sub-titles.
|
Loading…
Reference in New Issue
Block a user