{# Fix breadcrumbs for when mkdocs-section-index is used. #}
{# See https://github.com/squidfunk/mkdocs-material/issues/7614. #}

<!-- Render navigation link content -->
{% macro render_content(nav_item) %}
  <span class="md-ellipsis">
    {{ nav_item.title }}
  </span>
{% endmacro %}

<!-- Render navigation item -->
{% macro render(nav_item, ref=nav_item) %}
  {% if nav_item.is_page %}
    <li class="md-path__item">
      <a href="{{ nav_item.url | url }}" class="md-path__link">
        {{ render_content(ref) }}
      </a>
    </li>
  {% elif nav_item.children %}
    {{ render(nav_item.children | first, ref) }}
  {% endif %}
{% endmacro %}
