From c13e920908eb7312e6b22d30837270827645208d Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 20 Nov 2021 15:14:59 +0300 Subject: [PATCH] wrap page toc --- templates/index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index 98fdc8b..041abbe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -63,8 +63,10 @@ {{page.title}} - {% if current_path == page.path %} - +{% if page.toc %} + +{% if current_path == page.path %} + {% set_global header_count = 0 %} {% for h2 in page.toc %} {% set_global header_count = header_count + 1 %} @@ -92,7 +94,7 @@ {% endif %} - + {% endif %} {% endif %} {% endfor %}