-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is index.md supported? #78
Comments
Not that I am aware of. It looks like Waylan described how to implement it in this SO thread: https://stackoverflow.com/questions/54596774/how-to-add-permalinks-to-tree-nodes-in-markdown-nav-file-mkdocs-yml/54598748#54598748 Please let us know if you come up with an approach! |
My understanding is, there was a decision for a convention based approach to be implemented by the themes. An index.md as first array element should be used as target, but not rendered as normal entry. Why did you close the issue? |
Apologies. I interpreted this as a question about whether we support this as your title suggests. |
I don't closely follow the upstream project. If you are aware of conventions that are in place I would be happy to have a look and see how we can bring this into compliance with guidance. |
This is a comment from @waylan I am referring to:
Source mkdocs/mkdocs#1139 (comment) |
For future reference, here is an implementation suggestion from Waylan: {% if nav|length>1 %}
<ul>
{% for nav_item in nav %}
{% if nav_item.children %}
<li>{% if nav_item.children[0].is_index %}
<a href="{{ nav_item.children[0].url|url }}">{{ nav_item.title }}</a>
{% else %}
{{ nav_item.title }}
{% endif %}
<ul>
{% for nav_item in nav_item.children[1:] %}
<li class="{% if nav_item.active%}current{% endif %}">
<a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="{% if nav_item.active%}current{% endif %}">
<a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %} |
@chrissimpkins do you plan to implement this feature? When could it be available? |
Unfortunately I won't be able to do it myself in the near term but would be happy to consider a pull request if anyone out there has an interest in it. I really apologize. I am just bogged down with higher priority work. |
Is the index.md feature supported as described here?
mkdocs/mkdocs#1139 (comment)
The text was updated successfully, but these errors were encountered: