diff --git a/layouts/_partials/docs/toc-show.html b/layouts/_partials/docs/toc-show.html
index b8878cd..d54c312 100644
--- a/layouts/_partials/docs/toc-show.html
+++ b/layouts/_partials/docs/toc-show.html
@@ -1,5 +1,5 @@
-{{- return or
- (and (eq .Type "posts") (eq .Kind "section"))
+{{- return and
+ (not (eq .Params.bookToC false))
+ (not (eq .Site.Params.BookToC false))
(not (eq .TableOfContents ""))
- (default .Site.Params.BookToC .Params.BookToC)
--}}
\ No newline at end of file
+-}}