forked from next-theme/hexo-next-valine
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
47 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,31 @@ | ||
# Hexo NexT Valine | ||
# Hexo NexT Twikoo | ||
|
||
![Theme Version](https://img.shields.io/badge/NexT-v7.3.0+-blue?style=flat-square) | ||
![Package Version](https://img.shields.io/github/package-json/v/next-theme/hexo-next-valine?style=flat-square) | ||
![Package Version](https://img.shields.io/github/package-json/v/imaegoo/hexo-next-twikoo?style=flat-square) | ||
|
||
Valine comment system for NexT. Valine is a fast, simple & efficient Leancloud based no back end comment system. | ||
Twikoo comment system for NexT. Twikoo is a simple, safe, free comment system. | ||
|
||
## Install | ||
|
||
```bash | ||
npm install next-theme/hexo-next-valine | ||
npm install hexo-next-twikoo | ||
``` | ||
|
||
## Register | ||
|
||
1. Create an account or log into [LeanCloud](https://www.leancloud.cn/dashboard/login.html#/signin), and then click on the bottom left corner to [create the application](https://www.leancloud.cn/dashboard/applist.html#/newapp) in [dashboard](https://www.leancloud.cn/dashboard/applist.html#/apps). | ||
![Valine](https://theme-next.js.org/images/valine-1.png) | ||
2. Go to the application you just created, select `Settings → App Keys` in the lower left corner, and you will see your APP ID and APP Key. | ||
![Valine](https://theme-next.js.org/images/valine-2.png) | ||
Please refer to https://twikoo.js.org/quick-start.html | ||
|
||
## Configure | ||
|
||
Set the value `enable` to `true`, add the obtained APP ID (`appId`) and APP Key (`appKey`), and edit other configurations in `valine` section in the config file as following. You can config those in both **hexo** or **theme** `_config.yml`: | ||
Set the value `enable` to `true`, add the obtained env ID (`envId`), and edit other configurations in `twikoo` section in the config file as following. You can config those in both **hexo** or **theme** `_config.yml`: | ||
|
||
```yml next/_config.yml | ||
# Valine | ||
# For more information: https://valine.js.org, https://github.com/xCss/Valine | ||
valine: | ||
enable: false | ||
appId: # your leancloud application appid | ||
appKey: # your leancloud application appkey | ||
serverURLs: # When the custom domain name is enabled, fill it in here | ||
placeholder: Just go go # comment box placeholder | ||
avatar: mm # gravatar style | ||
meta: [nick, mail, link] # Custom comment header | ||
pageSize: 10 # pagination size | ||
visitor: false # leancloud-counter-security is not supported for now. When visitor is set to be true, appid and appkey are recommended to be the same as leancloud_visitors' for counter compatibility. Article reading statistic https://valine.js.org/visitor.html | ||
comment_count: true # If false, comment count will only be displayed in post page, not in home page | ||
recordIP: false # Whether to record the commenter IP | ||
# Twikoo | ||
# For more information: https://twikoo.js.org, https://github.com/imaegoo/twikoo | ||
twikoo: | ||
enable: true | ||
visitor: true | ||
envId: twikoo-1gs9l0fb17e7897a # 环境 ID,搭建教程:https://twikoo.js.org/quick-start.html | ||
# region: ap-guangzhou # 环境地域,默认为 ap-shanghai | ||
# path: 'window.location.pathname' # 自定义文章路径 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
# Valine | ||
# For more information: https://valine.js.org, https://github.com/xCss/Valine | ||
valine: | ||
# Twikoo | ||
# For more information: https://twikoo.js.org, https://github.com/imaegoo/twikoo | ||
twikoo: | ||
enable: false | ||
appId: # Your leancloud application appid | ||
appKey: # Your leancloud application appkey | ||
serverURLs: # When the custom domain name is enabled, fill it in here | ||
placeholder: Just go go # Comment box placeholder | ||
avatar: mm # Gravatar style | ||
meta: [nick, mail, link] # Custom comment header | ||
pageSize: 10 # Pagination size | ||
lang: # Language, available values: en, zh-cn | ||
# Warning: Do not enable both `valine.visitor` and `leancloud_visitors`. | ||
visitor: false # Article reading statistic | ||
comment_count: true # If false, comment count will only be displayed in post page, not in home page | ||
recordIP: false # Whether to record the commenter IP | ||
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar | ||
requiredFields: [] # Set required fields: [nick] | [nick, mail] | ||
visitor: false | ||
envId: twikoo-1gs9l0fb17e7897a # 环境 ID,搭建教程:https://twikoo.js.org/quick-start.html | ||
# region: ap-guangzhou # 环境地域,默认为 ap-shanghai | ||
# path: 'window.location.pathname' # 自定义文章路径 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script> | ||
NexT.utils.loadComments('#twikoo-comments', () => { | ||
NexT.utils.getScript('https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js', () => { | ||
twikoo.init(Object.assign({{ config.twikoo | safedump }}, { | ||
el: '#twikoo-comments' | ||
})); | ||
}, window.twikoo); | ||
}); | ||
</script> |
This file was deleted.
Oops, something went wrong.