mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-28 15:40:36 +00:00
14 lines
425 B
HTML
14 lines
425 B
HTML
{{- $format := default "html" (.Get "format") }}
|
|
{{- $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
|
|
|
{{- if and $tocLevels .Page.TableOfContents -}}
|
|
{{- if not (eq ($format | lower) "raw") -}}
|
|
<div class="gdoc-toc gdoc-toc__level--{{ $tocLevels }}">
|
|
{{ .Page.TableOfContents }}
|
|
<hr />
|
|
</div>
|
|
{{- else -}}
|
|
{{ .Page.TableOfContents }}
|
|
{{- end -}}
|
|
{{- end -}}
|