make Toc a site-wide Param
This commit is contained in:
parent
6ad2d19be8
commit
993f39f58d
@ -28,16 +28,10 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "cover.html" . }}
|
{{ partial "cover.html" . }}
|
||||||
|
|
||||||
{{ if .Params.Toc }}
|
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||||
<div class="table-of-contents">
|
<div class="table-of-contents">
|
||||||
<h2>
|
<h2>
|
||||||
{{ if .Params.TocTitle }}
|
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
|
||||||
{{ .Params.TocTitle }}
|
|
||||||
{{ else if $.Site.Params.TocTitle }}
|
|
||||||
{{ $.Site.Params.TocTitle }}
|
|
||||||
{{ else }}
|
|
||||||
Table of Contents
|
|
||||||
{{ end }}
|
|
||||||
</h2>
|
</h2>
|
||||||
{{ .TableOfContents }}
|
{{ .TableOfContents }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user