Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
kaolengmian7 2022-11-06 22:58:29 +08:00
commit 73b15c7271
4 changed files with 9 additions and 8 deletions

View File

@ -1 +1 @@
4.4.0 4.4.1

View File

@ -1,5 +1,5 @@
# Hugo NexT theme's custom config # Hugo NexT theme's custom config
version: 4.4.0 version: 4.4.1
domain: hugo-next.eu.org domain: hugo-next.eu.org

View File

@ -1,8 +1,8 @@
{{- range $k, $v := (partialCached "init.html" .) -}} {{- range $k, $v := (partialCached "init.html" .) -}}
{{- $.Scratch.Set $k $v -}} {{- $.Scratch.Set $k $v -}}
{{- end -}} {{- end -}}
{{ $commentEnable := .Params.comment.enable | default .Site.Params.comments.enable }} {{ $isComment := .Params.comment.enable | default .Site.Params.comments.enable }}
{{ .Scratch.Set "isComment" $commentEnable }} {{ .Scratch.Set "isComment" $isComment }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" data-theme="{{ .Scratch.Get "theme" }}"> <html lang="{{ .Site.LanguageCode }}" data-theme="{{ .Scratch.Get "theme" }}">
@ -31,7 +31,7 @@
<div class="main-inner {{ block "main_inner_class" . }}{{ end }}"> <div class="main-inner {{ block "main_inner_class" . }}{{ end }}">
<!-- Submenu,Content,Comment --> <!-- Submenu,Content,Comment -->
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
{{- if and .IsPage $commentEnable }} {{- if and .IsPage $isComment }}
{{- partialCached "comments.html" . }} {{- partialCached "comments.html" . }}
{{- end }} {{- end }}
</div> </div>

View File

@ -22,6 +22,7 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}} {{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}}
{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
<div class="post-meta-container"> <div class="post-meta-container">
<div class="post-meta-items"> <div class="post-meta-items">
{{ partial "post/header_meta/created_date.html" . }} {{ partial "post/header_meta/created_date.html" . }}
@ -29,10 +30,10 @@
{{ partial "post/header_meta/categories.html" . }} {{ partial "post/header_meta/categories.html" . }}
{{ if and $.IsHome (not (isset .Params "extlink")) }} {{ if and $.IsHome (not (isset .Params "extlink")) }}
<div class="post-meta-items"> <div class="post-meta-items">
{{ if and (eq .Site.Params.analytis.busuanzi.enable false) .Site.Params.waline.pageView }} {{ if .Site.Params.waline.pageView }}
{{ partial "post/header_meta/views.html" . }} {{ partial "post/header_meta/views.html" . }}
{{ end }} {{ end }}
{{ if and (.Scratch.Get "isComment") .Site.Params.waline.comment }} {{ if $isComment }}
{{ partial "post/header_meta/comments.html" . }} {{ partial "post/header_meta/comments.html" . }}
{{ end }} {{ end }}
</div> </div>
@ -43,7 +44,7 @@
{{ partial "post/header_meta/words.html" . }} {{ partial "post/header_meta/words.html" . }}
{{ partial "post/header_meta/readtime.html" . }} {{ partial "post/header_meta/readtime.html" . }}
{{ partial "post/header_meta/views.html" . }} {{ partial "post/header_meta/views.html" . }}
{{ if and (.Scratch.Get "isComment") .Site.Params.waline.comment }} {{ if $isComment }}
{{ partial "post/header_meta/comments.html" . }} {{ partial "post/header_meta/comments.html" . }}
{{ end }} {{ end }}
</div> </div>