From 943a8b4eaf192b348dd2dd2195583b0720d1832f Mon Sep 17 00:00:00 2001 From: kitian616 Date: Mon, 10 Dec 2018 23:32:46 +0800 Subject: [PATCH] docs: add Valine --- README-zh.md | 2 +- README.md | 2 +- _config.yml | 2 +- about.md | 2 +- docs/_config.dev.yml | 2 +- docs/_config.yml | 2 +- docs/_docs/en/2.1-configuration.md | 17 +++++++++++++++-- docs/_docs/zh/2.1-configuration.md | 21 ++++++++++++++++++--- test/_config.yml | 2 +- 9 files changed, 40 insertions(+), 12 deletions(-) diff --git a/README-zh.md b/README-zh.md index a9be97f7d24..3c110d36d64 100644 --- a/README-zh.md +++ b/README-zh.md @@ -26,7 +26,7 @@ TeXt 是针对个人或团队网站、博客、项目、文档等的一款高度 - 扩展(音频,视频,幻灯片,在线示例) - Markdown 增强([MathJax](https://www.mathjax.org/),[mermaid](https://mermaidjs.github.io/),[chartjs](http://www.chartjs.org/)) - 分享([AddToAny](https://www.addtoany.com/),[AddThis](https://www.addthis.com/)) -- 评论([Disqus](https://disqus.com/),[Gitalk](https://gitalk.github.io/)) +- 评论([Disqus](https://disqus.com/),[Gitalk](https://gitalk.github.io/),[Valine](https://valine.js.org/en/)) - 阅读量统计([LeanCloud](https://leancloud.cn/)) - 站点统计([Google Analytics](https://analytics.google.com/analytics/web/)) - RSS([jekyll-feed](https://github.com/jekyll/jekyll-feed)) diff --git a/README.md b/README.md index 652d2470a5a..0ebb325c1c0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr - Extensions (audios, videos, slides, demos) - Markdown enhancements ([MathJax](https://www.mathjax.org/), [mermaid](https://mermaidjs.github.io/), [chartjs](http://www.chartjs.org/)) - Sharing ([AddToAny](https://www.addtoany.com/), [AddThis](https://www.addthis.com/)) -- Comments ([Disqus](https://disqus.com/), [Gitalk](https://gitalk.github.io/)) +- Comments ([Disqus](https://disqus.com/), [Gitalk](https://gitalk.github.io/), [Valine](https://valine.js.org/en/)) - Pageview ([LeanCloud](https://leancloud.cn/)) - Analytics ([Google Analytics](https://analytics.google.com/analytics/web/)) - RSS ([jekyll-feed](https://github.com/jekyll/jekyll-feed)) diff --git a/_config.yml b/_config.yml index 4b9041aad93..68af65449c6 100644 --- a/_config.yml +++ b/_config.yml @@ -133,7 +133,7 @@ comments: # - your GitHub Id ## Valine - # please refer to https://valine.js.org/en/index.html for more info. + # please refer to https://valine.js.org/en/ for more info. valine: app_id : # LeanCloud App id app_key : # LeanCloud App key diff --git a/about.md b/about.md index e8cb47991c7..205c0ad7799 100644 --- a/about.md +++ b/about.md @@ -30,7 +30,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr - Extensions (audios, videos, slides, demos) - Markdown enhancements ([MathJax](https://www.mathjax.org/), [mermaid](https://mermaidjs.github.io/), [chartjs](http://www.chartjs.org/)) - Sharing ([AddToAny](https://www.addtoany.com/), [AddThis](https://www.addthis.com/)) -- Comments ([Disqus](https://disqus.com/), [Gitalk](https://gitalk.github.io/)) +- Comments ([Disqus](https://disqus.com/), [Gitalk](https://gitalk.github.io/), [Valine](https://valine.js.org/en/)) - Pageview ([LeanCloud](https://leancloud.cn/)) - Analytics ([Google Analytics](https://analytics.google.com/analytics/web/)) - RSS ([jekyll-feed](https://github.com/jekyll/jekyll-feed)) diff --git a/docs/_config.dev.yml b/docs/_config.dev.yml index f99793945d8..fa631f565c6 100644 --- a/docs/_config.dev.yml +++ b/docs/_config.dev.yml @@ -134,7 +134,7 @@ comments: # - your GitHub Id ## Valine - # please refer to https://valine.js.org/en/index.html for more info. + # please refer to https://valine.js.org/en/ for more info. valine: app_id : # LeanCloud App id app_key : # LeanCloud App key diff --git a/docs/_config.yml b/docs/_config.yml index 1672d2279cb..d74fe36e57f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -136,7 +136,7 @@ comments: - kitian616 ## Valine - # please refer to https://valine.js.org/en/index.html for more info. + # please refer to https://valine.js.org/en/ for more info. valine: app_id : uAG3OhdcH8H4fxSqXLyBljA7-gzGzoHsz app_key : Mzf5m9skSwYVWVXhGiYMNyXs diff --git a/docs/_docs/en/2.1-configuration.md b/docs/_docs/en/2.1-configuration.md index ed3adbb13a0..88904cd0c7b 100644 --- a/docs/_docs/en/2.1-configuration.md +++ b/docs/_docs/en/2.1-configuration.md @@ -278,6 +278,7 @@ You NEED set `sharing` variable as `true` in the page’s YAML Front Matter to e | --- | --- | | **disqus** | [Disqus](https://disqus.com/) | | **gitalk** | [Gitalk](https://github.com/gitalk/gitalk/) | +| **valine** | [Valine](https://valine.js.org/en/) | ### Disqus @@ -292,7 +293,7 @@ comments: ### Gitalk -To use gitalk you need a GitHub application, if you don't have one, [Click here to register](https://github.com/settings/applications/new) a new one. and then update *_config.yml* to: +To use Gitalk you need a GitHub application, if you don't have one, [Click here to register](https://github.com/settings/applications/new) a new one. and then update *_config.yml* to: ```yaml comments: @@ -307,6 +308,18 @@ comments: - "the-other-admin-github-id" ``` +### Valine + +To use Valine you need a [LeanCloud](https://leancloud.cn/) application, see [LeanCloud](#leancloud) for more information. + +```yaml +comments: + provider: valine + valine: + app_id : "your-leanCloud-app-id" + app_key : "your-leanCloud-app-key" +``` + For all the above comments systems, you NEED set `key` variable in the page’s YAML Front Matter to enable comments on this page, you can find more information [HERE](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts#page-layout). {:.warning} @@ -318,7 +331,7 @@ For all the above comments systems, you NEED set `key` variable in the page’s ### LeanCloud -This use [LeanCloud](https://leancloud.cn/) as back-end service. You need create a app on the dashboard, and config the app’s id, key and class name. +This use [LeanCloud](https://leancloud.cn/) as back-end service. You need create an application on the dashboard, and config the app’s id, key and class name. The detail guide of LeanCloud will find in [Chinese document](https://tianqi.name/jekyll-TeXt-theme/docs/zh/configuration#leancloud) since LeanCloud haven't provide an English-language edition. {:.info} diff --git a/docs/_docs/zh/2.1-configuration.md b/docs/_docs/zh/2.1-configuration.md index 503cb475619..7917210c26f 100644 --- a/docs/_docs/zh/2.1-configuration.md +++ b/docs/_docs/zh/2.1-configuration.md @@ -276,10 +276,11 @@ comments: | --- | --- | | **disqus** | [Disqus](https://disqus.com/) | | **gitalk** | [Gitalk](https://github.com/gitalk/gitalk/) | +| **valine** | [Valine](https://valine.js.org/en/) | ### Disqus -要想启用 disqus 作为评论系统,你需要注册一个 Disqus 账号然后申请一个针对该网站的 [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-),完成后将 shortname 填入到 *_config.yml* 中: +要想启用 Disqus 作为评论系统,你需要注册一个 Disqus 账号然后申请一个针对该网站的 [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-),完成后将 shortname 填入到 *_config.yml* 中: ```yaml comments: @@ -290,7 +291,7 @@ comments: ### Gitalk -要想启用 gitalk 作为评论系统,首先你需要一个 GitHub Application,如果没有[点击这里](https://github.com/settings/applications/new)申请。然后将相应的参数添加到 *_config.yml* 配置中: +要想启用 Gitalk 作为评论系统,首先你需要一个 GitHub Application,如果没有[点击这里](https://github.com/settings/applications/new)申请。然后将相应的参数添加到 *_config.yml* 配置中: ```yaml comments: @@ -305,6 +306,20 @@ comments: - "the-other-admin-github-id" ``` +### Valine + +要想启用 Valine 作为评论系统,你需要注册一个 LeanCloud 账号然后建立一个 LeanCloud 应用,详情见 [LeanCloud](#leancloud)。因为 Valine 会自动在应用中建立一个 Class,因此并不需要像文章点击量那样手动建立 Class。 + +可以和[文章点击量](#文章点击量)公用一个 LeanCloud 应用。 + +```yaml +comments: + provider: valine + valine: + app_id : "your-leanCloud-app-id" + app_key : "your-leanCloud-app-key" +``` + 对于上面所有的评论系统, 你都需要在页面的头信息里设置 `key` 属性来开启该页的评论,详情请戳[这里](https://tianqi.name/jekyll-TeXt-theme/docs/zh/layouts#page-%E5%B8%83%E5%B1%80)。 {:.warning} @@ -316,7 +331,7 @@ comments: ### LeanCloud -TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个应用,然后在应用中建立一个 Class,之后将必要的信息填写到 *_config.yml* 文件中。下面详细介绍其操作步骤。 +TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个 LeanCloud 应用,然后在应用中建立一个 Class,之后将必要的信息填写到 *_config.yml* 文件中。下面详细介绍其操作步骤。 在进入[主页](https://leancloud.cn/)后点击页面右上角的“访问控制台”,然后注册账号并登录。 diff --git a/test/_config.yml b/test/_config.yml index f157fa6ab84..fda3447ac64 100644 --- a/test/_config.yml +++ b/test/_config.yml @@ -133,7 +133,7 @@ comments: # - your GitHub Id ## Valine - # please refer to https://valine.js.org/en/index.html for more info. + # please refer to https://valine.js.org/en/ for more info. valine: app_id : # LeanCloud App id app_key : # LeanCloud App key