Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerry <git@caulfield.me>2020-06-11 14:06:46 +0300
committerGerry <git@caulfield.me>2020-06-11 14:34:03 +0300
commitbdbd8d844fcdfa87f54620a609009ee8750ea671 (patch)
tree8dedd58fe06f18ff3264b1044aaea2ec43f823ed
parent35053484e37ce935168d2f6ad24fa75d0398d6a1 (diff)
Fix the toc boolean so it's actually a boolean
All other boolean values allowed passing `true` or `false` however the `toc` page-level param was only checking for the string "false". This was inconstent will all other variables so I've addressed that here.
-rw-r--r--layouts/_default/single.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b735167..6fb482d 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -43,7 +43,7 @@
{{ define "side" }}
- {{ if and (gt .WordCount 0 ) (ne .Params.toc "false") }}
+ {{ if and (gt .WordCount 0 ) (default true .Params.toc) }}
<div id="toc" class="Box Box--blue mb-3">
<b>{{ .Title }}</b>
{{- $toc := .TableOfContents -}}