diff --git a/layouts/index.html b/layouts/index.html
index d449c273..6fb75f9d 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -13,7 +13,7 @@
{{partial "darkmode.html" .}}
- {{ if (and $.Site.Data.config.enableToc (not (.Params.disableToc))) }}
+ {{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}