1
1
{%- comment -%}
2
- Most of this is the taken directly from just-the-docs on github.
3
- I just changed the nav structure a bit, to include the table of contents.
4
-
5
- Include as: {%- include_cached components/site_nav.html -%}
2
+ Include as: {%- include_cached components/site_nav.html all=bool -%}
6
3
Depends on: site.
7
- Results in: HTML for the site-nav.
4
+ Results in: cached HTML for the main navigation when `all` is nil or false;
5
+ includes links to pages excluded from the main navigation when `all` is true.
8
6
Includes:
9
- components/nav.html
7
+ components/nav/pages .html
10
8
Overwrites:
11
9
pages_top_size, collections_size, collection_entry,
12
10
collection_key, collection_value, collection.
13
11
{%- endcomment -%}
14
12
15
- < nav >
13
+ < nav aria-label =" Main " id =" site-nav " class =" site-nav " >
16
14
{% assign pages_top_size = site.html_pages
17
15
| where_exp:"item", "item.title != nil"
18
16
| where_exp:"item", "item.parent == nil"
19
17
| where_exp:"item", "item.nav_exclude != true"
20
18
| size %}
21
19
{% if pages_top_size > 0 %}
22
- {% include components/nav.html pages=site.html_pages %}
20
+ {% include components/nav/pages .html pages=site.html_pages all=include.all %}
23
21
{% endif %}
24
22
{%- if site.nav_external_links -%}
25
23
< ul class ="nav-list ">
54
52
</ button >
55
53
{%- endif -%}
56
54
< div class ="nav-category "> {{ collection_value.name }}</ div >
57
- {% include components/nav.html pages=collection %}
55
+ {% include components/nav/pages .html pages=collection all=include.all %}
58
56
</ li >
59
57
</ ul >
60
58
{% else %}
61
59
< div class ="nav-category "> {{ collection_value.name }}</ div >
62
- {% include components/nav.html pages=collection %}
60
+ {% include components/nav/pages .html pages=collection all=include.all %}
63
61
{% endif %}
64
62
{% else %}
65
- {% include components/nav.html pages=collection %}
63
+ {% include components/nav/pages .html pages=collection all=include.all %}
66
64
{% endif %}
67
65
{% endif %}
68
66
{% endfor %}
69
67
{% endif %}
70
- </ nav >
68
+ </ nav >
69
+
70
+ {% if site.nav_error_report %}
71
+ {{ nav_error_report }}
72
+ {%- endif %}
0 commit comments