-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
I'm using the mkdocs theme and tried to enhance it with a breadcrumb trail. The page navigation is created automatically by mkdocs (I don't use the pages confguration since I have almost 300 pages).
I copied and adapted the breadcrumbs.html file from the readthedocs theme and integrated it in content.html:
<ol class="breadcrumb">
<li><a href="{{ homepage_url }}">Docs</a></li>
{% if current_page %}
{% for doc in current_page.ancestors %}
{% if doc.link %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{% else %}
<li>{{ doc.title }}</li>
{% endif %}
{% endfor %}
{% endif %}
{% if current_page %}<li>{{ current_page.title }}</li>{% endif %}
</ol>
My file path (starting from the docs_dir) is:
beheerteam/diensten/algemeen/ActiveDirectory.md
The generated breadcrumb trail is:
Docs/algemeen/ActiveDirectory
algemeen is the only part that originates from the loop for doc in current_page.ancestors.
Maybe this is a stupid question or it is just not possible, but I couldn't find i in the documentation and I'm just starting with mkdocs and couldn't understand the source on how this works.
Reactions are currently unavailable