Skip to content

Commit

Permalink
docs: Fix breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Oct 17, 2024
1 parent 3636b7d commit 4f0463e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/.overrides/partials/path-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{# 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 %}
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ theme:
- content.tooltips
- navigation.expand
- navigation.footer
- navigation.indexes
- navigation.path
- navigation.sections
- navigation.tabs
Expand Down

0 comments on commit 4f0463e

Please sign in to comment.