Skip to content

Commit

Permalink
fix: ToC setting bug, closes #120
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-sid committed Sep 23, 2023
1 parent 1645338 commit cb695b1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ <h1 class="header-title">{{ .Title }}</h1>
</div>
{{ end }}
</header>
{{- if or .Params.toc .Site.Params.toc }}
<details class="toc">
<summary><b>Table of Contents</b></summary>
{{ .TableOfContents }}
</details>
{{- if .Site.Params.toc -}}
{{ if not (eq .Params.toc false) }}
<details class="toc">
<summary><b>Table of Contents</b></summary>
{{ .TableOfContents }}
</details>
{{ end }}
{{- end -}}
<div class="page-content">
{{ .Content }}
Expand Down

0 comments on commit cb695b1

Please sign in to comment.