fix: fix formatting issue while using nested toc shortcodes (#415)
This commit is contained in:
parent
6ab98d1da3
commit
6b464202c9
7 changed files with 47 additions and 34 deletions
|
@ -1,8 +1,13 @@
|
|||
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
||||
{{- $format := default "html" (.Get "format") }}
|
||||
{{- $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
||||
|
||||
{{ if and $tocLevels .Page.TableOfContents }}
|
||||
<div class="gdoc-toc gdoc-toc__level--{{ $tocLevels }}">
|
||||
{{- 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 }}
|
||||
<hr />
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue