Fix behavior of user guide TOC

This commit is contained in:
Andrés Moya 2021-03-08 16:35:21 +01:00
parent f17ff29051
commit f2d4299eb9
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ templateClass: tmpl-developer-guide
<li>
<a href="{{ child.url }}">{{ child.data.title }}</a>
{%- if page.url.includes(child.url) -%}
{{ show_children(child) }}
{{ show_children(child) }}
{%- endif -%}
{%- if child.url == page.url -%}
{{ content | toc(tags=['h2', 'h3']) | stripHash | safe }}

View File

@ -8,7 +8,9 @@ templateClass: tmpl-user-guide
{%- if loop.first -%}<ul>{%- endif -%}
<li>
<a href="{{ child.url }}">{{ child.data.title }}</a>
{{ show_children(child) }}
{%- if page.url.includes(child.url) -%}
{{ show_children(child) }}
{%- endif -%}
{%- if child.url == page.url -%}
{{ content | toc(tags=['h2', 'h3']) | safe }}
{%- endif -%}