Fix linkified breadcrumb items in readthedocs theme

A doc can never have a `link` attribute so this branch never kicked in.

Actually even now, this branch will still not kick in, only mkdocs-section-index makes this state possible.
This commit is contained in:
Oleh Prypin
2023-09-11 00:00:07 +02:00
parent c070dd0202
commit 4bd896c8f2

View File

@@ -3,8 +3,8 @@
<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 class="breadcrumb-item">{{ doc.title }}</li>
{%- endif %}