🐛 Fixed the comment setting in front matter.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{- $pageCfg := dict
|
||||
"isHome" .IsHome
|
||||
"isPage" .IsPage
|
||||
"comments" (.Params.comments | default .Site.Params.comments.enable)
|
||||
"comments" (.Scratch.Get "isComment")
|
||||
"permalink" (.Page.Permalink | absURL)
|
||||
"path" (.Page.Permalink | path.Base)
|
||||
"title" .Page.Title
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{ if .Site.Params.waline.pageView }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.waline.comment }}
|
||||
{{ if and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
|
||||
{{ partial "post/header_meta/comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
{{ partial "post/header_meta/words.html" . }}
|
||||
{{ partial "post/header_meta/readtime.html" . }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
{{ if .Site.Params.waline.comment }}
|
||||
{{ if and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
|
||||
{{ partial "post/header_meta/comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div class="tool-buttons" >
|
||||
{{ if .Scratch.Get "isComment" }}
|
||||
<div id="goto-comments" class="button goto-comments" title="{{ T "ToolBtns.comment" }}">
|
||||
<i class="fas fa-comments"></i>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.footer.translate }}
|
||||
<div id="goto-gtranslate" class="button" title="{{ T "ToolBtns.lang" }}">
|
||||
<i class="fas fa-globe"></i>
|
||||
|
||||
Reference in New Issue
Block a user