Add post: 暗黑能天使
This commit is contained in:
22
layouts/partials/comment.html
Normal file
22
layouts/partials/comment.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- if .Site.Params.comment.platform }}
|
||||
{{- warnf "Param `comment.platform` in params.yaml is deprecated and will be removed in Eureka v1.0.0. Please use `comment.handler` instead." }}
|
||||
{{- end }}
|
||||
{{- $commentHandler := .Site.Params.comment.handler | default .Site.Params.comment.platform }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
|
||||
{{- $enableComment := false }}
|
||||
|
||||
{{- if $commentHandler }}
|
||||
{{- $bundles := partial "utils/get-bundles" . }}
|
||||
{{- $enableComment = true }}
|
||||
{{- range $bundles.Reverse }}
|
||||
{{- if and (ne .Params.enableComment nil) (ne .Params.enableComment "") }}
|
||||
{{- $enableComment = .Params.enableComment }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if $enableComment }}
|
||||
{{ partial (printf "comment/%s" $commentHandler) . }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user