diff --git a/assets/_main.scss b/assets/_main.scss index 20a0ec2..aae48d2 100644 --- a/assets/_main.scss +++ b/assets/_main.scss @@ -399,7 +399,7 @@ body[dir="rtl"] .book-menu { .book-menu-overlay { display: block; - position: absolute; + position: fixed; top: 0; bottom: 0; left: 0; diff --git a/layouts/_partials/docs/toc-show.html b/layouts/_partials/docs/toc-show.html index 5115c84..b8878cd 100644 --- a/layouts/_partials/docs/toc-show.html +++ b/layouts/_partials/docs/toc-show.html @@ -1,4 +1,5 @@ -{{ return default +{{- return or + (and (eq .Type "posts") (eq .Kind "section")) (not (eq .TableOfContents "")) (default .Site.Params.BookToC .Params.BookToC) -}} \ No newline at end of file +-}} \ No newline at end of file diff --git a/layouts/baseof.html b/layouts/baseof.html index 418890c..c1b0d97 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -52,7 +52,7 @@ {{ define "header" }} {{ partial "docs/header" . }} - {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} + {{ if partial "docs/toc-show" . }}