{% set class = "md-nav__item" %}
{% if nav_item.active %}
{% set class = "md-nav__item md-nav__item--active" %}
{% endif %}
{% if nav_item.children %}
{% set checked = "checked" if nav_item.active %}
{% elif nav_item == page %}
{% set toc = page.toc %}
{% if toc | first is defined and "\x3ch1 id=" in page.content %}
{% set toc = (toc | first).children %}
{% endif %}
{% if toc | first is defined %}
{% endif %}
{{ nav_item.title }}
{% if toc | first is defined %}
{% include "partials/toc.html" %}
{% endif %}