Pages can show the table of contents by setting the renderTableOfContents parameter.
17 lines
454 B
HTML
17 lines
454 B
HTML
{{ define "main" }}
|
|
<main class="main--single">
|
|
<header class="page-header">
|
|
{{ partial "page_header.html" (dict "page" .) }}
|
|
</header>
|
|
|
|
{{ if .Params.renderTableofContents | default false }}
|
|
<details>
|
|
<summary>{{ i18n "tableOfContents" }}</summary>
|
|
{{ .TableOfContents }}
|
|
</details>
|
|
{{ end }}
|
|
<footer class="page-footer">
|
|
{{ partial "page/footer.html" . }}
|
|
</footer>
|
|
</main>
|
|
{{ end }}
|