11{%- 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 -%}
63 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.
86 Includes:
9- components/nav.html
7+ components/nav/pages .html
108 Overwrites:
119 pages_top_size, collections_size, collection_entry,
1210 collection_key, collection_value, collection.
1311{%- endcomment -%}
1412
15- < nav >
13+ < nav aria-label =" Main " id =" site-nav " class =" site-nav " >
1614 {% assign pages_top_size = site.html_pages
1715 | where_exp:"item", "item.title != nil"
1816 | where_exp:"item", "item.parent == nil"
1917 | where_exp:"item", "item.nav_exclude != true"
2018 | size %}
2119 {% 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 %}
2321 {% endif %}
2422 {%- if site.nav_external_links -%}
2523 < ul class ="nav-list ">
5452 </ button >
5553 {%- endif -%}
5654 < 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 %}
5856 </ li >
5957 </ ul >
6058 {% else %}
6159 < 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 %}
6361 {% endif %}
6462 {% else %}
65- {% include components/nav.html pages=collection %}
63+ {% include components/nav/pages .html pages=collection all=include.all %}
6664 {% endif %}
6765 {% endif %}
6866 {% endfor %}
6967 {% endif %}
70- </ nav >
68+ </ nav >
69+
70+ {% if site.nav_error_report %}
71+ {{ nav_error_report }}
72+ {%- endif %}
0 commit comments