From 242fcc297903c2e47c35946da5f99f97d091de0a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 31 Jan 2022 12:44:47 +0100 Subject: Add sections as documentation pages --- templates/documentation.html | 11 ++++++++--- templates/partials/doc/global_toc.html | 11 +++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/documentation.html b/templates/documentation.html index 55a5c61..154df5f 100644 --- a/templates/documentation.html +++ b/templates/documentation.html @@ -1,11 +1,13 @@ {% extends 'base.html' %} {% block title %} - {{ config.title }} | {{ page.title }} + {{ config.title }} | {% if page %}{{ page.title }}{% else %}{{ section.title }}{% endif %} {% endblock %} {% block content %} - {% set section = get_section(path="documentation/_index.md") %} + {% if not page %} + {% set page = section %} + {% endif %}
{% include "partials/doc/global_toc.html" %} @@ -45,7 +47,10 @@ {% endblock %} {% block custom_js %} + {% if not page %} + {% set page = section %} + {% endif %} {% if page.toc %} {% include "partials/doc/toc_script.html" %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/partials/doc/global_toc.html b/templates/partials/doc/global_toc.html index f739f49..277739c 100644 --- a/templates/partials/doc/global_toc.html +++ b/templates/partials/doc/global_toc.html @@ -1,3 +1,4 @@ + {% set section = get_section(path="documentation/_index.md") %} \ No newline at end of file + -- cgit v1.2.3