diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 7e065ec..bf068f0 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,11 @@ -{{ if and (.Site.Config.Services.Disqus.Shortname) (.Param "comments") (not .Site.IsServer) }} +{{- $server := "" }} +{{- if ge (int (index (split hugo.Version ".") 1)) "120" }} + {{- $server = hugo.IsServer }} +{{- else }} + {{- $server = .Site.IsServer }} +{{- end }} +{{- if and (.Site.Config.Services.Disqus.Shortname) (.Param "comments") (not $server) }}
{{ template "_internal/disqus.html" . }}
-{{ end }} \ No newline at end of file +{{- end }} \ No newline at end of file