From 451198931d6d83a879b4c633991c56181e18a942 Mon Sep 17 00:00:00 2001 From: hidennis Date: Mon, 14 Aug 2017 22:38:49 +0800 Subject: [PATCH] add livere comment plugin support (#274) --- _config.yml.example | 1 + layout/comment/counter.ejs | 2 ++ layout/comment/index.ejs | 2 ++ layout/comment/livere.ejs | 22 ++++++++++++++++++++++ layout/comment/scripts.ejs | 2 ++ 5 files changed, 29 insertions(+) create mode 100644 layout/comment/livere.ejs diff --git a/_config.yml.example b/_config.yml.example index f2ca1be..f9a6819 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -64,6 +64,7 @@ comment: #Register an OAuth application, and you will get a client ID and a client secret. client_id: #your client ID client_secret: #your client secret + livere: # enter livere uid here # Share share: default # options: jiathis, bdshare, addtoany, default diff --git a/layout/comment/counter.ejs b/layout/comment/counter.ejs index eb73d59..849facc 100644 --- a/layout/comment/counter.ejs +++ b/layout/comment/counter.ejs @@ -11,5 +11,7 @@ 0 <%= __('article.comments') %> <% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %> <%= __('article.comments') %> + <% } else if (theme.comment.livere) { %> + <%= __('article.comments') %> <% } %> <% } %> \ No newline at end of file diff --git a/layout/comment/index.ejs b/layout/comment/index.ejs index f69a0fa..8b0da47 100644 --- a/layout/comment/index.ejs +++ b/layout/comment/index.ejs @@ -11,6 +11,8 @@
<%- partial('comment/isso') %>
<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %>
<%- partial('comment/changyan') %>
+ <% } else if (theme.comment.livere) { %> +
<%- partial('comment/livere') %>
<% } else if (theme.comment.gitment) { %>
<%- partial('comment/gitment') %>
<% } %> diff --git a/layout/comment/livere.ejs b/layout/comment/livere.ejs new file mode 100644 index 0000000..562d0a1 --- /dev/null +++ b/layout/comment/livere.ejs @@ -0,0 +1,22 @@ +<% if (typeof(script) !== 'undefined' && script) { %> + + + + + + +<% } else { %> +
>
+<% } %> \ No newline at end of file diff --git a/layout/comment/scripts.ejs b/layout/comment/scripts.ejs index 9810c31..58d75d9 100644 --- a/layout/comment/scripts.ejs +++ b/layout/comment/scripts.ejs @@ -16,4 +16,6 @@ theme.comment.gitment.client_id && theme.comment.gitment.client_secret) { %> <%- partial('comment/gitment', { script: true }) %> +<% } else if (theme.comment.livere) { %> + <%- partial('comment/livere', { script: true }) %> <% } %>