add basic table of contents

This commit is contained in:
Adam Ormsby 2020-03-12 23:16:33 +07:00
parent 4be09e7180
commit f9e72c9d4c

View file

@ -40,6 +40,10 @@
{{ end }} {{ end }}
<div class="post-content"> <div class="post-content">
{{ if .Params.Toc }}
<h2>Table of Contents</h2>
<aside class="table-of-contents">{{ .TableOfContents }}</aside>
{{ end }}
{{ .Content }} {{ .Content }}
</div> </div>
{{ if eq .Type $.Site.Params.contentTypeName }} {{ if eq .Type $.Site.Params.contentTypeName }}