mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-16 08:02:24 -06:00
Revert "Optional delay of grandchildren link display"
This reverts commit 8ac545a5eb5da8e2ebe7dda1a8bffa9d94e88cc2.
This commit is contained in:
parent
5d58a66301
commit
89f79138c3
@ -27,9 +27,6 @@ search_enabled: true
|
|||||||
# Enable or disable heading anchors
|
# Enable or disable heading anchors
|
||||||
heading_anchors: true
|
heading_anchors: true
|
||||||
|
|
||||||
# Restrict display of grandchildren to selected parent when true:
|
|
||||||
grandchildren_branch: false
|
|
||||||
|
|
||||||
# Aux links for the upper right navigation
|
# Aux links for the upper right navigation
|
||||||
aux_links:
|
aux_links:
|
||||||
"Just the Docs on GitHub":
|
"Just the Docs on GitHub":
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
{%- 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 -%}
|
||||||
{%- if page.url == child.url or page.parent == child.title or site.grandchildren_branch != true -%}
|
|
||||||
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
|
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
|
||||||
<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 -%}
|
||||||
@ -30,7 +29,6 @@
|
|||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -191,20 +191,6 @@ This would create the following navigation structure:
|
|||||||
+-- ..
|
+-- ..
|
||||||
```
|
```
|
||||||
|
|
||||||
The current default is that when a grandparent is selected, the links to its
|
|
||||||
children *and all its grandchildren* are displayed in the navigation menu.
|
|
||||||
So in the above example, selecting `UI Components` displays the link to
|
|
||||||
`Button Child Page` as well as the link to `Buttons`.
|
|
||||||
|
|
||||||
Setting the following global option in `_config.yml` delays the display of links
|
|
||||||
to grandchildren until their parent is selected. So selecting `UI Components`
|
|
||||||
displays only the link to `Buttons`, and the link to `Button Child Page` is
|
|
||||||
displayed when `Buttons` is selected.
|
|
||||||
|
|
||||||
```
|
|
||||||
grandchildren_branch: true
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Auxiliary Navigation
|
## Auxiliary Navigation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user