From 0b3ff067d9cdc67cc26d9ca89b942d860e47e6c7 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 15 Aug 2021 16:53:12 +0000 Subject: [PATCH] Simplify `if` condition, and format code --- .../partials/comments/provider/disqusjs.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/layouts/partials/comments/provider/disqusjs.html b/layouts/partials/comments/provider/disqusjs.html index 1ce7d7f..b407fc8 100644 --- a/layouts/partials/comments/provider/disqusjs.html +++ b/layouts/partials/comments/provider/disqusjs.html @@ -1,19 +1,19 @@
{{- $pc := .Site.Config.Privacy.Disqus -}} {{- $disqusjs := .Site.Params.Comments.Disqusjs -}} - {{- if not $pc.Disable -}} - {{ if and $disqusjs.Shortname $disqusjs.ApiKey }}
+ {{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}} +
- {{end}} {{- end -}}