{% for section in site.data.docs %} {% assign is_expanded = false %} {% if page.toc.expand %} {% if page.toc.expand == section.title %} {% assign is_expanded = true %} {% endif %} {% else %} {% for item in section.docs %} {% assign item_id = item | prepend:"/docs/" %} {% assign p = site.docs | where:"id",item_id | first %} {% if p.id == page.id %} {% assign is_expanded = true %} {% break %} {% endif %} {% endfor %} {% endif %} {% if is_expanded %}

{{ section.title }}

{% include docs_ul.html items=section.docs %} {% else %} {% assign section_key = section.docs|first|prepend:"/docs/" %} {% assign section_index = site.docs | where:"id",section_key | first %}

{{ section.title }}

{% endif %} {% endfor %}