{% endif %}
{% endfor %}
{% elif page.parent and page.parent.is_section and page.parent.children[0] == page %}
{# add local contents on section home pages #}
{% set target = page.parent %}
Contents
{% include "partials/contents_block.html" %}
{% 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 %}