Skip to content

Commit 1d7daf7

Browse files
authored
Add changyan count configuration (theme-next#570)
1 parent c53fd12 commit 1d7daf7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ changyan:
610610
enable: false
611611
appid:
612612
appkey:
613+
# Show comments count
614+
count: true
613615

614616
# LiveRe comments system
615617
# You can get your uid from https://livere.com/insight/myCode (General web site)

scripts/filters/comment/changyan.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ hexo.extend.filter.register('theme_inject', injects => {
1919
// Add post_meta
2020
hexo.extend.filter.register('theme_inject', injects => {
2121
const config = hexo.theme.config.changyan;
22-
if (!config.enable || !config.appid || !config.appkey) return;
22+
if (!config.enable || !config.count || !config.appid || !config.appkey) return;
2323

2424
injects.postMeta.raw('changyan', `
2525
{% if post.comments %}

0 commit comments

Comments
 (0)