From fba1b065036115cea8d067b74ee04c292db022b8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 31 Jan 2022 16:28:01 +0100 Subject: [PATCH] Improve sections as pages --- .../{quick_start.md => quick-start/_index.md} | 4 +- templates/documentation.html | 4 +- templates/partials/doc/page_toc.html | 6 +- templates/partials/doc/pagination.html | 63 ++++++++----------- 4 files changed, 35 insertions(+), 42 deletions(-) rename content/documentation/{quick_start.md => quick-start/_index.md} (99%) diff --git a/content/documentation/quick_start.md b/content/documentation/quick-start/_index.md similarity index 99% rename from content/documentation/quick_start.md rename to content/documentation/quick-start/_index.md index 617d1d5..91910eb 100644 --- a/content/documentation/quick_start.md +++ b/content/documentation/quick-start/_index.md @@ -1,6 +1,8 @@ +++ title = "Quick Start" -weight = 5 +weight = 0 +sort_by = "weight" +template = "documentation.html" +++ diff --git a/templates/documentation.html b/templates/documentation.html index 154df5f..d22d9e6 100644 --- a/templates/documentation.html +++ b/templates/documentation.html @@ -39,7 +39,9 @@ {% include "partials/doc/page_toc.html" %}
- {% if page.earlier or page.later or page.lighter or page.heavier %} + {% if page.earlier or page.later or page.lighter or page.heavier or page.pages %} + {% include "partials/doc/pagination.html" %} + {% elif page.ancestors and page.ancestors | length == 3 %} {% include "partials/doc/pagination.html" %} {% endif %}
diff --git a/templates/partials/doc/page_toc.html b/templates/partials/doc/page_toc.html index 238d8c3..b874b4b 100644 --- a/templates/partials/doc/page_toc.html +++ b/templates/partials/doc/page_toc.html @@ -26,8 +26,10 @@ {% endif %}
- {% if page.earlier or page.later or page.lighter or page.heavier %} + {% if page.earlier or page.later or page.lighter or page.heavier or page.pages %} + {% include "partials/doc/pagination.html" %} + {% elif page.ancestors and page.ancestors | length == 3 %} {% include "partials/doc/pagination.html" %} {% endif %}
- \ No newline at end of file + diff --git a/templates/partials/doc/pagination.html b/templates/partials/doc/pagination.html index 0170a77..167669e 100644 --- a/templates/partials/doc/pagination.html +++ b/templates/partials/doc/pagination.html @@ -7,64 +7,51 @@