mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-17 00:22:24 -06:00
Merge pull request #239 from KasparEtter/fix-duplicates-in-nav
Fix duplicate entries in nav.html and default.html
This commit is contained in:
commit
484563b297
@ -29,7 +29,7 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
||||||
{%- if child.has_children -%}
|
{%- if child.has_children -%}
|
||||||
{%- assign grand_children_list = pages_list | where: "parent", child.title -%}
|
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
|
||||||
<ul class="navigation-list-child-list">
|
<ul class="navigation-list-child-list">
|
||||||
{%- for grand_child in grand_children_list -%}
|
{%- for grand_child in grand_children_list -%}
|
||||||
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
||||||
|
@ -83,8 +83,9 @@ layout: table_wrappers
|
|||||||
<hr>
|
<hr>
|
||||||
<h2 class="text-delta">Table of contents</h2>
|
<h2 class="text-delta">Table of contents</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in pages_list %}
|
{%- assign children_list = pages_list | where: "parent", node.title -%}
|
||||||
{% if child.parent == page.title and child.title != page.title %}
|
{% for child in children_list %}
|
||||||
|
{% if child.parent == page.title and child.title != page.title and child.grand_parent == page.parent %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
|
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user