mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
toc: fix display when empty #469
This commit is contained in:
parent
0cc5ff2db6
commit
7252f82bb6
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@
|
||||||
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
|
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
|
||||||
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
|
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
|
||||||
{{- $toc_content := partial "toc.html" . }}
|
{{- $toc_content := partial "toc.html" . }}
|
||||||
{{- $hastoc := not (eq 0 (int (len ($toc_content | plainify)))) }}
|
{{- $hastoc := not (eq 0 (int (len (trim ($toc_content | plainify) "\n\t ")))) }}
|
||||||
{{- $toc := and $hastoc (not $currentDisableToc) (eq $outputFormat "html") }}
|
{{- $toc := and $hastoc (not $currentDisableToc) (eq $outputFormat "html") }}
|
||||||
<div id="breadcrumbs">
|
<div id="breadcrumbs">
|
||||||
<span id="sidebar-toggle-span">
|
<span id="sidebar-toggle-span">
|
||||||
|
|
Loading…
Reference in a new issue