add global, local, default TOC

This commit is contained in:
Dave Derderian 2019-03-25 11:56:59 +09:00
parent 3cf9638af1
commit 5987519fd6

View File

@ -22,6 +22,17 @@
{{ if .Params.Toc }}
<div class="table-of-contents">
{{ if or $.Site.Params.TocTitle .Params.Toc }}
<h1>
{{ if .Params.TocTitle }}
{{ .Params.TocTitle }}
{{ else if $.Site.Params.TocTitle }}
{{ $.Site.Params.TocTitle }}
{{ else }}
Table of Contents
{{ end }}
</h1>
{{ end }}
{{ .TableOfContents }}
</div>
{{ end }}