Add ToC rendering

This commit is contained in:
Jez Cope 2021-04-04 17:00:42 +01:00
parent 17accdaf84
commit f54579db48
3 changed files with 17 additions and 0 deletions

View File

@ -119,3 +119,11 @@ h6, .content h6
&:before
content: none
.toc
@extend .panel
@extend .is-size-7
@extend .mt-4
ul
@extend .menu-list

View File

@ -12,6 +12,7 @@
{{ .Render "frag/metadata" }}
</div>
<div class="column is-8">
{{ partial "toc" . }}
<div class="content">
{{ .Content }}
</div>

View File

@ -0,0 +1,8 @@
{{ if .Params.ShowTOC }}
<div class="toc">
<p class="panel-heading">Contents</p>
<div class="panel-block">
{{ .TableOfContents }}
</div>
</div>
{{ end }}