You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
current_page.ancestors only contains direct ancestor and not the full path of the page #693
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.
Activity
Add all ancestors to a page
d0ugal commentedon Jul 25, 2015
Confirmed the issue, I've got a fix which should resolve it - #694
Add all ancestors to a page
d0ugal commentedon Jul 25, 2015
re-opening as it sounds like #694 may not have fixed all the things.
d0ugal commentedon Jan 19, 2016
Okay, I've tested this and think it behaves as I expected.