🐛 Fixed the comment enabled setting.
This commit is contained in:
parent
53f3a902c1
commit
ee86b0d152
@ -22,7 +22,7 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $.IsHome }} </h2> {{ else }} </h1> {{ end }}
|
||||
{{ $comments := .Site.Params.postMeta.comments.enable }}
|
||||
{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.postMeta.comments.enable }}
|
||||
<div class="post-meta-container">
|
||||
<div class="post-meta-items">
|
||||
{{ 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,7 +42,7 @@
|
||||
{{ partial "post/header_meta/words.html" . }}
|
||||
{{ partial "post/header_meta/readtime.html" . }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
{{ if $comments }}
|
||||
{{ if $isComment }}
|
||||
{{ partial "post/header_meta/comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<span class="post-meta-item-text" title="{{ T "PostMeta.comments" }}">
|
||||
{{ print (T "PostMeta.comments") (T "Symbol.colon") }}
|
||||
</span>
|
||||
<span id="comments-count" {{ if and .Site.Params.postMeta.comments.enable (eq .Site.Params.postMeta.comments.plugin "waline") }}class="waline-comment-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<span id="comments-count" {{ if eq .Site.Params.postMeta.comments.plugin "waline" }}class="waline-comment-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<i class="fa fa-sync fa-spin"></i>
|
||||
</span>
|
||||
</span>
|
Loading…
Reference in New Issue
Block a user