diff --git a/_cdn.yml b/_cdn.yml index bd8a963cc..2921061ca 100644 --- a/_cdn.yml +++ b/_cdn.yml @@ -332,6 +332,15 @@ waline_js: npm: true static: false cdnjs: true +discuss: + name: discuss + file: dist/discuss.js + cdnjs_file: dist/discuss.js + cdnjs_no_min_file: true + version: 1.1.4 + npm: true + static: false + cdnjs: true vssue_js: name: vssue file: dist/vssue.github.min.js diff --git a/_config.yml b/_config.yml index 01f4e9ecb..1c147e44d 100755 --- a/_config.yml +++ b/_config.yml @@ -539,6 +539,14 @@ comments: # 组件属性地址:https://waline.js.org/reference/component.html # meta: ['nick', 'mail', 'link'] + # Discuss + # https://discuss.js.org + discuss: + serverURLs: # Discuss server address url + visitStat: true # 是否显示文章阅读数 + # https://discuss.js.org/Quick-Start.html#path + + ############################### Comments ############################### > end ############################### Sidebar ############################### > start diff --git a/layout/_meta/counter.ejs b/layout/_meta/counter.ejs index 561b3a2b4..29e93923d 100644 --- a/layout/_meta/counter.ejs +++ b/layout/_meta/counter.ejs @@ -17,6 +17,7 @@ if (theme.plugins.busuanzi.enable || (theme.comments.service=='waline' && theme.comments.waline.pageview) || (theme.comments.service=='twikoo' && theme.comments.twikoo.visitor) + || (theme.comments.service=='discuss' && theme.comments.discuss.visitStat) || (theme.comments.service=='artalk' && theme.comments.artalk.visitor)) { checkComment = !checkComment; } @@ -35,6 +36,10 @@ + <% } else if (theme.comments.service=='discuss' && theme.comments.discuss.visitStat) { %> + + + <% } else if (theme.comments.service=='artalk' && theme.comments.artalk.visitor) { %> diff --git a/layout/_plugins/comments/discuss/script.ejs b/layout/_plugins/comments/discuss/script.ejs new file mode 100644 index 000000000..0d2cada7e --- /dev/null +++ b/layout/_plugins/comments/discuss/script.ejs @@ -0,0 +1,23 @@ + diff --git a/source/css/_first/base_first.styl b/source/css/_first/base_first.styl index 149839e67..36b9e9891 100644 --- a/source/css/_first/base_first.styl +++ b/source/css/_first/base_first.styl @@ -106,7 +106,7 @@ button background: alpha($color-card, .9) !important backdrop-filter: saturate(200%) blur(20px) -if hexo-config(hexo-config('comments.service')=='twikoo' || hexo-config('comments.service')=='waline' +if hexo-config('comments.service')=='discuss' || hexo-config('comments.service')=='twikoo' || hexo-config('comments.service')=='waline' .blur#comments @supports (backdrop-filter: blur(20px)) backdrop-filter: unset