hugo-book-theme/layouts/partials/docs/toc.html

6 lines
230 B
HTML

{{ $tocLevels := default (default 6 .Site.Params.BookToC) .Params.BookToC }}
{{ if and $tocLevels .Page.TableOfContents }}
<aside class="book-toc level-{{$tocLevels}} fixed">
{{ .Page.TableOfContents }}
</aside>
{{ end }}