From a046f865e9b0d4a5160868b124806ed3d1bee297 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Thu, 29 Dec 2022 17:32:49 +0100
Subject: [PATCH] config to disable home toc

---
 config.yaml        |  5 ++++-
 layouts/index.html | 14 ++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/config.yaml b/config.yaml
index fc15d7d8..a7f93153 100644
--- a/config.yaml
+++ b/config.yaml
@@ -10,4 +10,7 @@ params:
       truncate_description: 0 # Set to 0 to disable truncate
   pages:
     list:
-      truncate_description: 0 # Set to 0 to disable truncate
\ No newline at end of file
+      truncate_description: 0 # Set to 0 to disable truncate
+  home:
+    toc:
+      disabled: true
\ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 28a6e97e..af420fdc 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -2,12 +2,14 @@
   {{ partial "home/hero.html" . }}
 
   <div class="document-content">
-    {{ partial "toc/container.html"
-        (dict
-            "toc" "toc/default.html"
-            "context" .
-        )
-    }}
+    {{- if not $.Site.Params.home.toc.disabled -}}
+      {{ partial "toc/container.html"
+          (dict
+              "toc" "toc/default.html"
+              "context" .
+          )
+      }}
+    {{- end -}}
 
     {{ partial "home/chapo.html" (dict
         "block_wrapped" true
-- 
GitLab