{% for section in site.data.toc %}
    {% capture sectionUrl %}{{ section.url | replace: "/", "" }}{% endcapture %} {% capture pageUrl %}{{ page.url | replace: "/", "" }}{% endcapture %}
  • {{ section.title }}
  • {% if section.links %}
      • {% for entry in section.links %}
      • {{ entry.title }}
      • {% if page.url contains entry.url or pageUrl == sectionUrl %}
        • {% if entry.children %} {% for child in entry.children %} {{ child.title }} {% endfor %} {% endif %}
        {% endif %} {% endfor %}
    {% endif %}
{% endfor %}