2022-05-22 13:07:35 -07:00
|
|
|
{{- $format := default "html" (.Get "format") }}
|
|
|
|
{{- $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
2020-01-12 06:33:02 -08:00
|
|
|
|
2022-05-22 13:07:35 -07:00
|
|
|
{{- if and $tocLevels .Page.TableOfContents -}}
|
|
|
|
{{- if not (eq ($format | lower) "raw") -}}
|
|
|
|
<div class="gdoc-toc gdoc-toc__level--{{ $tocLevels }}">
|
|
|
|
{{ .Page.TableOfContents }}
|
|
|
|
<hr />
|
|
|
|
</div>
|
|
|
|
{{- else -}}
|
2022-01-06 04:58:10 -08:00
|
|
|
{{ .Page.TableOfContents }}
|
2022-05-22 13:07:35 -07:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|