From 5fc72f78a6dff1cd264227665363be34622f8cea Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Thu, 22 Sep 2022 11:59:17 +0200 Subject: [PATCH] Show TOC after page title --- templates/macros.html | 21 +++++++++++++++++++++ templates/page.html | 1 + 2 files changed, 22 insertions(+) diff --git a/templates/macros.html b/templates/macros.html index f10d52e..81aefd3 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -34,6 +34,27 @@ {% endif %} {% endmacro %} +{% macro toc() %} + {% if page.toc %} + + {% endif %} +{% endmacro %} + {% macro list_taxonomy(kind, page=false, prepend="") %} {# Option `kind` must always be set and specifies the wanted taxonomy. diff --git a/templates/page.html b/templates/page.html index 2ea0240..8ef4f68 100644 --- a/templates/page.html +++ b/templates/page.html @@ -6,6 +6,7 @@ {% block content %}

{{ page.title }}

+ {{ macros::toc() }} {{ page.content | safe }} {{ macros::page_info(page=page) }} {% endblock content %}