From cdd5d402367dcda73c2af79b0dc88cfeb9550f55 Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Thu, 17 Oct 2019 01:15:53 +0200 Subject: [PATCH] only show comments on non-pages, and add noscript text --- .../layouts/partials/comments.html | 11 +++++++++++ .../static/comments/getcomments.js | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/themes/hugo-mastodon-comments/layouts/partials/comments.html b/themes/hugo-mastodon-comments/layouts/partials/comments.html index 997856c..1dd9460 100644 --- a/themes/hugo-mastodon-comments/layouts/partials/comments.html +++ b/themes/hugo-mastodon-comments/layouts/partials/comments.html @@ -1,5 +1,15 @@ +{{ if ne .Params.page true }}
Comments
+
@@ -8,6 +18,7 @@
+{{ end }} diff --git a/themes/hugo-mastodon-comments/static/comments/getcomments.js b/themes/hugo-mastodon-comments/static/comments/getcomments.js index 3d47f86..2c02f81 100644 --- a/themes/hugo-mastodon-comments/static/comments/getcomments.js +++ b/themes/hugo-mastodon-comments/static/comments/getcomments.js @@ -2,7 +2,6 @@ $(document).ready(function() { // check if we show a blog post or not. Regex is defined in site-wide config var patt = new RegExp(BlogRegex); - console.log(patt); var isArticle = patt.test(RelPermalink); if (isArticle === false) { console.log("Not a blog post, no need to search for comments");