diff --git a/README.md b/README.md index a8c83dd..4f86e35 100755 --- a/README.md +++ b/README.md @@ -65,14 +65,43 @@ avatar: "https://xaoxuu.com/assets/img/avatar.jpg" ``` ### 评论 -如果你使用其他的评论系统,请自己修改主题。 +提供3种可选,建议一次只使用一种评论系统。如果你使用其他的评论系统,请自己修改主题。 + +#### Disqus + +官网: [http://disqus.com/](http://disqus.com/) ```yaml # disqus评论 disqus_shortname: #你的disqus的shortname# +``` + +#### Livere 来必力 + +官网: [http://www.laibili.com.cn/](http://www.laibili.com.cn/) + +```yaml # 来必力评论 livere_shortname: #你的disqus的shortname# ``` +#### Valine + +官网: [https://valine.js.org](https://valine.js.org) + +```yaml +# valine +valine: + enable: true # 如果你想用Valine评论系统,请设置enable为true + appId: + appKey: + guest_info: nick,mail #valine comment header info + placeholder: 快来评论吧~ # valine comment input placeholder(like: Please leave your footprints ) + avatar: mp # gravatar style https://valine.js.org/avatar + pageSize: 10 # comment list page size + verify: false # valine verify code (true/false) + notify: false # valine mail notify (true/false) + lang: zh-cn +``` ### 推荐文章 diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index c5155d3..8ebe003 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -56,32 +56,65 @@
+
- <% if (post.comments && config.livere_shortname){ %> -
-
- + +
+
+ <% } %> - j = d.createElement(s); - j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; - j.async = true; + <% if (config.disqus_shortname) { %> +
+
+ ⚠️ 无法加载评论系统,请确保您的网络能够正常访问 Disqus 。 +
+
+ <% } %> - e.parentNode.insertBefore(j, e); - })(document, 'script'); - - - -
- <% } %> - <% if (post.comments && config.disqus_shortname){ %> -
-
⚠️无法加载评论系统,请确保您的网络能够正常访问 Disqus
-
+ <% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %> +
+
+ + + +
+ <% } %> + <% } %> <% if (post && theme.recommended_posts.enabled) { %> <%- partial('post/recommended_posts', {page: post, site: site}) %>