diff --git a/layouts/partials/post/header.html b/layouts/partials/post/header.html index f5324d0..968740e 100644 --- a/layouts/partials/post/header.html +++ b/layouts/partials/post/header.html @@ -22,7 +22,7 @@ {{ end }} {{ end }} {{ if $.IsHome }} {{ else }} {{ end }} -{{ $comments := .Site.Params.postMeta.comments.enable }} +{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.postMeta.comments.enable }}
{{ partial "post/header_meta/created_date.html" . }} @@ -32,7 +32,7 @@ {{ if and .Site.Params.postMeta.views.enable (ne .Site.Params.postMeta.views.plugin "busuanzi") }} {{ partial "post/header_meta/views.html" . }} {{ end }} - {{ if $comments }} + {{ if $isComment }} {{ partial "post/header_meta/comments.html" . }} {{ end }} {{ end }} @@ -42,8 +42,8 @@ {{ partial "post/header_meta/words.html" . }} {{ partial "post/header_meta/readtime.html" . }} {{ partial "post/header_meta/views.html" . }} - {{ if $comments }} - {{ partial "post/header_meta/comments.html" . }} + {{ if $isComment }} + {{ partial "post/header_meta/comments.html" . }} {{ end }}
{{ end }} diff --git a/layouts/partials/post/header_meta/comments.html b/layouts/partials/post/header_meta/comments.html index 5590703..eca0d26 100644 --- a/layouts/partials/post/header_meta/comments.html +++ b/layouts/partials/post/header_meta/comments.html @@ -5,7 +5,7 @@ {{ print (T "PostMeta.comments") (T "Symbol.colon") }} - + \ No newline at end of file