diff --git a/_config.yml.example b/_config.yml.example index 543ab45..b533c31 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -55,6 +55,9 @@ comment: youyan: # enter youyan uid here facebook: # enter true to enable isso: # enter the domain name of your own comment isso server eg. comments.example.com + changyan: # please fill in `appid` and `conf` to enable + appid: + conf: # Share share: default # options: jiathis, bdshare, addtoany, default diff --git a/layout/comment/changyan.ejs b/layout/comment/changyan.ejs new file mode 100644 index 0000000..dc63230 --- /dev/null +++ b/layout/comment/changyan.ejs @@ -0,0 +1,12 @@ +<% if (typeof(script) !== 'undefined' && script) { %> + + + +<% } else { %> +
+<% } %> \ No newline at end of file diff --git a/layout/comment/counter.ejs b/layout/comment/counter.ejs index 7f9d5c3..eb73d59 100644 --- a/layout/comment/counter.ejs +++ b/layout/comment/counter.ejs @@ -9,5 +9,7 @@ <%= __('article.comments') %> <% } else if (theme.comment.facebook) { %> 0 <%= __('article.comments') %> + <% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %> + <%= __('article.comments') %> <% } %> <% } %> \ No newline at end of file diff --git a/layout/comment/index.ejs b/layout/comment/index.ejs index 66396f0..0389e83 100644 --- a/layout/comment/index.ejs +++ b/layout/comment/index.ejs @@ -10,6 +10,8 @@ <%- partial('comment/facebook') %> <% } else if (theme.comment.isso) { %> <%- partial('comment/isso') %> + <% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %> + <%- partial('comment/changyan') %> <% } %> <% } %> \ No newline at end of file diff --git a/layout/comment/scripts.ejs b/layout/comment/scripts.ejs index 4035552..f94ac39 100644 --- a/layout/comment/scripts.ejs +++ b/layout/comment/scripts.ejs @@ -8,4 +8,6 @@ <%- partial('comment/facebook', { script: true }) %> <% } else if (theme.comment.isso) { %> <%- partial('comment/isso', { script: true }) %> +<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %> + <%- partial('comment/changyan', { script: true }) %> <% } %>