From 11814feeeeb9d3c916182e2d10c2cf77552b7388 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 19 Feb 2021 08:31:12 +0000 Subject: [PATCH] fix(disqus): missing comment count in listing previews Fix #2171 --- wowchemy/layouts/partials/comments/disqus.html | 4 ---- wowchemy/layouts/partials/site_js.html | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/wowchemy/layouts/partials/comments/disqus.html b/wowchemy/layouts/partials/comments/disqus.html index 0c8ceddd..cea5211b 100644 --- a/wowchemy/layouts/partials/comments/disqus.html +++ b/wowchemy/layouts/partials/comments/disqus.html @@ -19,8 +19,4 @@ comments powered by Disqus - -{{ if (site.Params.comments.disqus.show_count | default true) }} - -{{end}} {{end}} diff --git a/wowchemy/layouts/partials/site_js.html b/wowchemy/layouts/partials/site_js.html index b0aa7599..72eab0be 100644 --- a/wowchemy/layouts/partials/site_js.html +++ b/wowchemy/layouts/partials/site_js.html @@ -94,6 +94,13 @@ {{ printf "" (printf $js.plotly.url $js.plotly.version) $js.plotly.sri | safeHTML }} {{ end }} + {{/* Disqus Comment Count JS. */}} + {{/* Note: count can appear both in listing previews and on the content page itself. */}} + {{ $comments_provider := trim (site.Params.comments.provider | lower) " " }} + {{ if eq $comments_provider "disqus" | and (site.Params.comments.disqus.show_count | default true) }} + + {{end}} + {{ $js_bootstrap := resources.Get "js/_vendor/bootstrap.bundle.js" }} {{- if hugo.IsProduction -}} {{ $js_bootstrap = $js_bootstrap | minify | fingerprint "md5" }}