#693, Hide ToC aside menu if table of contents is empty
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<h3>{{ partial "docs/title" . }}</h3>
|
||||
|
||||
<label for="toc-control">
|
||||
{{ if default true (default .Site.Params.BookToC .Params.BookToC) }}
|
||||
{{ if partial "docs/toc-show" . }}
|
||||
<img src="{{ "svg/toc.svg" | relURL }}" class="book-icon" alt="Table of Contents" />
|
||||
{{ end }}
|
||||
</label>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{{ return default true (
|
||||
and
|
||||
(default .Site.Params.BookToC .Params.BookToC)
|
||||
(not (eq .TableOfContents "<nav id=\"TableOfContents\"></nav>"))
|
||||
) }}
|
||||
Reference in New Issue
Block a user