diff --git a/layout/_meta/counter.ejs b/layout/_meta/counter.ejs index 176c6fba3..a8702d84c 100644 --- a/layout/_meta/counter.ejs +++ b/layout/_meta/counter.ejs @@ -12,9 +12,19 @@ if(commentPath) path = commentPath; path = path.replaceAll('/index.html', '/').replaceAll('.html', '') + + let checkComment = false; + if (theme.analytics && theme.analytics.leancloud && theme.analytics.leancloud.app_id + || theme.analytics.busuanzi + || theme.comments.service=='waline' && theme.comments.waline.pageview + || theme.comments.service=='twikoo' + || theme.comments.service=='discuss' + || theme.comments.service=='artalk') { + checkComment = !checkComment; + } %> -<% if (!!page.comments) { %> +<% if (!!page.comments && checkComment) { %>