{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
  {% set site_url = site_url ~ "/index.html" %}
{% endif %}
<nav class="md-nav md-nav--primary" aria-label="{{ lang.t('nav.title') }}" data-md-level="0">
  {% if config.repo_url %}
    <div class="md-nav__source">
      {% include "partials/source.html" %}
    </div>
  {% endif %}
  <ul class="md-nav__list" data-md-scrollfix>
    {% for nav_item in nav %}
      {% set path = "nav-" + loop.index | string %}
      {% set level = 1 %}
      {% include "partials/nav-item.html" %}
    {% endfor %}
  </ul>
</nav>
