2323<!-- Determine title -->
2424{% set title = lang.t("toc") %}
2525{% if config.mdx_configs.toc and config.mdx_configs.toc.title %}
26- {% set title = config.mdx_configs.toc.title %}
26+ {% set title = config.mdx_configs.toc.title %}
2727{% endif %}
2828
2929<!-- Table of contents -->
3030< nav class ="md-nav md-nav--secondary " aria-label ="{{ title }} ">
31- {% set toc = page.toc %}
31+ {% set toc = page.toc %}
3232
33- <!--
33+ <!--
3434 Check whether the content starts with a level 1 headline. If it does, the
3535 top-level anchor must be skipped, since it would be redundant to the link
3636 to the current page that is located just above the anchor. Therefore we
3737 directly continue with the children of the anchor.
3838 -->
39- {% set first = toc | first %}
40- {% if first and first.level == 1 %}
39+ {% set first = toc | first %}
40+ {% if first and first.level == 1 %}
4141 {% set toc = first.children %}
42- {% endif %}
42+ {% endif %}
4343
44- <!-- Table of contents title and list -->
45- {% if toc %}
44+ <!-- Table of contents title and list -->
45+ {% if toc %}
4646 < label class ="md-nav__title " for ="__toc ">
47- < span class ="md-nav__icon md-icon "> </ span >
48- {{ title }}
47+ < span class ="md-nav__icon md-icon "> </ span >
48+ {{ title }}
4949 </ label >
5050 < ul class ="md-nav__list " data-md-component ="toc " data-md-scrollfix >
51- {% for toc_item in toc %}
51+ {% for toc_item in toc %}
5252 {% include "partials/toc-item.html" %}
53- {% endfor %}
53+ {% endfor %}
5454
55-
56- <!-- Add single page view to TOC-->
57- < li class ="md-nav__item ">
58- < a href ="/SparkFun_DataLogger/hookup_guide/single_page " class ="md-nav__link ">
59- < span class ="md-ellipsis ">
60- View Guide as Single-Page {% include ".icons/fontawesome/solid/scroll.svg" %}
61- </ span >
62- </ a >
63- </ li >
64- </ ul >
65- {% endif %}
66- </ nav >
55+ {% endif %}
56+ </ nav >
0 commit comments