Skip to content

Commit

Permalink
docs: add Valine
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Dec 10, 2018
1 parent 9b0656f commit 943a8b4
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 15 additions & 2 deletions docs/_docs/en/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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}

Expand All @@ -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}
Expand Down
21 changes: 18 additions & 3 deletions docs/_docs/zh/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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}

Expand All @@ -316,7 +331,7 @@ comments:

### LeanCloud

TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个应用,然后在应用中建立一个 Class,之后将必要的信息填写到 *_config.yml* 文件中。下面详细介绍其操作步骤。
TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个 LeanCloud 应用,然后在应用中建立一个 Class,之后将必要的信息填写到 *_config.yml* 文件中。下面详细介绍其操作步骤。

在进入[主页](https://leancloud.cn/)后点击页面右上角的“访问控制台”,然后注册账号并登录。

Expand Down
2 changes: 1 addition & 1 deletion test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 943a8b4

Please sign in to comment.