From c59463165e4789a6a71217c73659ae27ebf4c6aa Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 1 Apr 2026 12:35:00 +0200 Subject: [PATCH] fix: `toc.integrate` broken in modern theme (0.0.11 regression) (#111) Signed-off-by: squidfunk --- dist/partials/nav-item.html | 22 +++++++++++----------- src/partials/nav-item.html | 30 +++++++++++++++--------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dist/partials/nav-item.html b/dist/partials/nav-item.html index c9476ab4..5b1dc5fc 100644 --- a/dist/partials/nav-item.html +++ b/dist/partials/nav-item.html @@ -141,19 +141,19 @@ {% elif nav_item.active %}
  • + {% set toc = page.toc %} {% if config.theme.variant == "classic" %} - {% set toc = page.toc %} - {% set first = toc | first %} - {% if first and first.level == 1 %} - {% set toc = first.children %} - {% endif %} - {% if toc %} - - {% endif %} + {% endif %} + {% set first = toc | first %} + {% if first and first.level == 1 %} + {% set toc = first.children %} + {% endif %} + {% if toc %} + {% endif %} {{ render_content(nav_item) }} diff --git a/src/partials/nav-item.html b/src/partials/nav-item.html index 5f00ec32..8216bc59 100644 --- a/src/partials/nav-item.html +++ b/src/partials/nav-item.html @@ -266,29 +266,29 @@ {% elif nav_item.active %}
  • - {% if config.theme.variant == "classic" %} - {% set toc = page.toc %} + {% set toc = page.toc %} - + + {% if config.theme.variant == "classic" %} + {% endif %} - - {% set first = toc | first %} - {% if first and first.level == 1 %} - {% set toc = first.children %} - {% endif %} + + {% set first = toc | first %} + {% if first and first.level == 1 %} + {% set toc = first.children %} + {% endif %} - - {% if toc %} - - {% endif %} + + {% if toc %} + {% endif %}