{% extends "base.html" %} {% block title %}{{ page.title }} | {{ config.title }}{% endblock title %} {% block toc %} {% set docs_section = get_section(path="_index.md") %} {{ macros::toc_nav(docs_section=docs_section, current_page=page) }} {% endblock toc %} {% block content_id %}{{ page.slug }}{% endblock content_id %} {% block content %}

{{ page.title }}

{{ page.content | safe }} {# Calculate prev/next from section pages #} {% set prev_page = false %} {% set next_page = false %} {% set found_current = false %} {% for doc_page in docs_section.pages %} {# A hide_from_nav page is skipped as a prev/next candidate, so nothing links into it, but the current-page test below stays unguarded: viewing such a page directly must still flip found_current, or its own prev/next would compute against the wrong neighbour. It keeps a prev link back out. #} {% set hidden = doc_page.extra.hide_from_nav | default(value=false) %} {% if found_current and not next_page and not hidden %} {% set_global next_page = doc_page %} {% endif %} {% if doc_page.permalink == page.permalink %} {% set_global found_current = true %} {% endif %} {% if not found_current and not hidden %} {% set_global prev_page = doc_page %} {% endif %} {% endfor %} {% endblock content %}