Skip to content

Commit

Permalink
Merge pull request #3383 from mkdocs/breadcrumbs
Browse files Browse the repository at this point in the history
Fix breadcrumb display in readthedocs theme
  • Loading branch information
oprypin committed Sep 13, 2023
2 parents 347c3a9 + 4bd896c commit 0d6fc28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mkdocs/themes/readthedocs/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="{{ nav.homepage.url|url }}" class="icon icon-home" aria-label="{% trans %}Docs{% endtrans %}"></a> &raquo;</li>
<li><a href="{{ nav.homepage.url|url }}" class="icon icon-home" aria-label="{% trans %}Docs{% endtrans %}"></a></li>
{%- if page %}
{%- for doc in page.ancestors[::-1] %}
{%- if doc.link %}
<li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{%- if doc.url %}
<li class="breadcrumb-item"><a href="{{ doc.url|url }}">{{ doc.title }}</a></li>
{%- else %}
<li>{{ doc.title }} &raquo;</li>
<li class="breadcrumb-item">{{ doc.title }}</li>
{%- endif %}
{%- endfor %}
<li class="breadcrumb-item active">{{ page.title }}</li>
Expand Down

0 comments on commit 0d6fc28

Please sign in to comment.