{%- for path in config.extra_css %} {%- endfor %}

{{ config.site_name }}

{# add page content #} {{ page.content }} {% if page.is_homepage %} {# add global contents on the root page #}

Contents

{% for nav_item in nav %} {% if nav_item != page %}

{% if nav_item.url %} {% set nav_item_url = nav_item.url %} {% else %} {% set nav_item_url = nav_item.children[0].url %} {% endif %} {{ nav_item.title }}

{% if nav_item.children %}
{% for nav_subitem in nav_item.children %} {% if nav_subitem.url != nav_item_url %}
  • {{nav_subitem.title}}
  • {% endif %} {% endfor %}
    {% endif %} {% endif %} {% endfor %} {# add local contents on section home pages #} {% elif page.parent and page.parent.is_section and page.parent.children[0] == page %}

    Contents

    {% for child_page in page.parent.children %} {% if child_page != page %}
  • {{child_page.title}}
  • {% endif %} {% endfor %}
    {% endif %}
    {# add a back arrow if there's a parent to go back to #} {% set backlink_target = page.parent %} {% if backlink_target and backlink_target.is_section and page == backlink_target.children[0] %} {% set backlink_target = backlink_target.parent %} {% endif %} {% if backlink_target %} {% endif %} {%- for script in config.extra_javascript %} {{ script | script_tag }} {%- endfor %}