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

github.com/wlh320/hugo-theme-hulga.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzilcH40 <wlh233@live.com>2022-09-14 19:21:52 +0300
committerzilcH40 <wlh233@live.com>2022-09-14 19:21:52 +0300
commit84a7aca340d301ea15700035d5a611a0ad9207d9 (patch)
treec4c645fad4b9f25145a939c56b0f9eade0bae7b3 /layouts/partials/post.html
parentc6535284e9a632d58670f26a4e7689c73e868a8c (diff)
fix small bugs
- revert wrong toc logic in last commit - fix display extra character in title when subtitle is not set - fix unnecessary hover effect of fake button on navbar
Diffstat (limited to 'layouts/partials/post.html')
-rw-r--r--layouts/partials/post.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/post.html b/layouts/partials/post.html
index 0d27aee..63c9d7c 100644
--- a/layouts/partials/post.html
+++ b/layouts/partials/post.html
@@ -1,5 +1,5 @@
{{ partial "post-header.html" . }}
-{{- $setToc := or .Params.toc .Site.Params.toc -}}
+{{- $setToc := or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
{{- $headers := findRE "<h[1-3].*?>(.|\n])+?</h[1-3]>" .Content -}}
{{- $hasToc := ge (len $headers) 1 -}}
{{- $showToc := and $setToc $hasToc -}}