From dd3766bce317f34093032b2786174b56db5c3ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sun, 6 Nov 2022 17:24:23 +0800 Subject: [PATCH 1/2] :memo: Startup hotfix for v4.4.1 --- VERSION | 2 +- data/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 64b5ae3..4f3470c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.0 \ No newline at end of file +4.4.1 \ No newline at end of file diff --git a/data/config.yaml b/data/config.yaml index 434707a..09b516b 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -1,5 +1,5 @@ # Hugo NexT theme's custom config -version: 4.4.0 +version: 4.4.1 domain: hugo-next.eu.org \ No newline at end of file From 8918bff71f77ee06be8db1c827feba4131994b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Sun, 6 Nov 2022 18:23:55 +0800 Subject: [PATCH 2/2] :bug: Fixed the page views counter in home page. --- layouts/_default/baseof.html | 6 +++--- layouts/partials/post/header.html | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8db7191..a83b22c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,8 +1,8 @@ {{- range $k, $v := (partialCached "init.html" .) -}} {{- $.Scratch.Set $k $v -}} {{- end -}} -{{ $commentEnable := .Params.comment.enable | default .Site.Params.comments.enable }} -{{ .Scratch.Set "isComment" $commentEnable }} +{{ $isComment := .Params.comment.enable | default .Site.Params.comments.enable }} +{{ .Scratch.Set "isComment" $isComment }} @@ -31,7 +31,7 @@
{{- block "main" . }}{{- end }} - {{- if and .IsPage $commentEnable }} + {{- if and .IsPage $isComment }} {{- partialCached "comments.html" . }} {{- end }}
diff --git a/layouts/partials/post/header.html b/layouts/partials/post/header.html index b482c8e..2097a4f 100644 --- a/layouts/partials/post/header.html +++ b/layouts/partials/post/header.html @@ -22,6 +22,7 @@ {{- end }} {{- end }} {{- if $.IsHome }} {{ else }} {{ end -}} +{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }}