From 07a7af3db68f5f2a624e87e87c44a1ed28baf715 Mon Sep 17 00:00:00 2001 From: Ali Faraji <31096694+alifa98@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:18:05 -0500 Subject: [PATCH] Refactor TOC conditionals (#3358) It inserts TOC if non provided and auto TOC is enabled for distill layout --- _layouts/distill.liquid | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_layouts/distill.liquid b/_layouts/distill.liquid index d6bae39..d9e8684 100644 --- a/_layouts/distill.liquid +++ b/_layouts/distill.liquid @@ -67,7 +67,7 @@ {% endif %} - {% if page.toc %} + {% if page.toc and page.toc.size > 0 %} + + {% elsif page.toc == true %} + + + {% endif %} + {{ content }}