Skip to content
Snippets Groups Projects
Unverified Commit e34c5913 authored by kogeletey's avatar kogeletey
Browse files

templates: macros new setting config.extra.children to activate list of

headings after h1
parent a17a1bc0
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,12 @@
<h3 class="toc-h3"> In this article </h3>
<ul class="toc-ul">
{% for h1 in page.toc %}
<li class="toc-li {% if h1.permalink | safe == current_url %} toc-li__active {% endif %}"> <a class="toc-a " href="{{ h1.permalink }}"> {{ h1.title }} </a></li>
{% if h1.children %}
<li class="toc-li {% if h1.permalink | safe == current_url %} toc-li__active {% endif %}"> <a class="toc-a " href="{{ h1.permalink | safe }}"> {{ h1.title }} </a></li>
{% if h1.children and config.extra.children %}
{% for h2 in h1.children %}
<li class="toc-li {% if h2.permalink | safe == current_url %} toc-li__active {% endif %}"> <a class="toc-a " href="{{ h2.permalink }}"> {{ h2.title }} </a></li>
<li class="toc-li x2 {% if h2.permalink | safe == current_url %} toc-li__active {% endif %}"> <a class="toc-a " href="{{ h2.permalink| safe }}"> {{ h2.title }} </a></li>
{% endfor %}
{%endif%}
{% endif %}
{% endfor %}
</ul>
</aside>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment