-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 修复 私有部署 显示、隐藏、置顶、删除评论功能异常 * 修复 私有部署 某些场景下邮件通知不发送的问题,并完善了邮件通知的日志 * 文档 更新 FAQ
- Loading branch information
Showing
12 changed files
with
91 additions
and
93 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
<!-- Twikoo --> | ||
<div id="twikoo"></div> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected].4/dist/twikoo.all.min.js" ref="twikooJs"></component> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected].5/dist/twikoo.all.min.js" ref="twikooJs"></component> | ||
</div> | ||
</template> | ||
</ParentLayout> | ||
|
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 |
---|---|---|
|
@@ -49,7 +49,7 @@ exports.main = require('twikoo-func').main | |
8. 创建完成后,点击“twikoo"进入云函数详情页,进入“函数代码”标签,点击“文件 - 新建文件”,输入 `package.json`,回车 | ||
9. 复制以下代码、粘贴到代码框中,点击“保存并安装依赖” | ||
``` json | ||
{ "dependencies": { "twikoo-func": "1.6.4" } } | ||
{ "dependencies": { "twikoo-func": "1.6.5" } } | ||
``` | ||
|
||
### 命令行部署 | ||
|
@@ -206,7 +206,7 @@ twikoo: | |
|
||
``` html | ||
<div id="tcomment"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].4/dist/twikoo.all.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].5/dist/twikoo.all.min.js"></script> | ||
<script> | ||
twikoo.init({ | ||
envId: '您的环境id', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) | ||
|
@@ -224,10 +224,10 @@ twikoo.init({ | |
|
||
如果遇到默认 CDN 加载速度缓慢,可更换其他 CDN 镜像。以下为可供选择的公共 CDN,其中一些 CDN 可能需要数天时间同步最新版本: | ||
|
||
* `https://cdn.staticfile.org/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://cdn.bootcdn.net/ajax/libs/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://cdn.jsdelivr.net/npm/[email protected].4/dist/twikoo.all.min.js` | ||
* `https://cdn.staticfile.org/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://cdn.bootcdn.net/ajax/libs/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://cdn.jsdelivr.net/npm/[email protected].5/dist/twikoo.all.min.js` | ||
|
||
## 开启管理面板(腾讯云环境) | ||
|
||
|
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 |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
|
||
## 如何修改头像? | ||
|
||
请前往 [https://cn.gravatar.com](https://cn.gravatar.com) 通过邮箱注册并设定头像,评论时,请留下相同的邮箱。 | ||
请前往 [https://cravatar.cn](https://cravatar.cn) 通过邮箱注册并设定头像,评论时,请留下相同的邮箱。 | ||
|
||
访客还可以通过输入数字 QQ 邮箱地址,使用 QQ 头像发表评论。 | ||
|
||
## 如何修改、重置管理员密码? | ||
|
||
请前往[云开发控制台](https://console.cloud.tencent.com/tcb/database/collection/config)编辑配置,删除 config.ADMIN_PASS 配置项,然后前往 Twikoo 管理面板重新设置密码。 | ||
腾讯云请前往[云开发控制台](https://console.cloud.tencent.com/tcb/database/collection/config),Vercel 请前往 MongoDB,私有部署请直接编辑 `data/db.json.1`,编辑配置,删除 config.ADMIN_PASS 配置项,然后前往 Twikoo 管理面板重新设置密码。 | ||
|
||
## 如何获得管理面板的私钥文件? | ||
|
||
|
@@ -26,21 +26,6 @@ | |
|
||
来展示访问量。暂不支持全站访问量统计。 | ||
|
||
## 如何测试 Akismet 反垃圾配置是否生效? | ||
|
||
请填写 `viagra-test-123` 作为昵称,或填写 `[email protected]` 作为邮箱,发表评论,这条评论将一定会被视为垃圾评论。 | ||
|
||
需要注意的是,由于 Akismet 服务响应速度较慢(大约 6 秒),影响用户体验,Twikoo 采取 “先放行,后检测” 的策略,垃圾评论会在发表后短暂可见。 | ||
|
||
## 免费资源如何计算? | ||
|
||
您可以在云开发[环境总览](https://console.cloud.tencent.com/tcb/env/overview)看到资源使用情况。Twikoo 会消耗**数据库**和**云函数**两种资源,两种资源的免费用量为—— | ||
|
||
* 数据库:读 50,000 次/日,写 50,000 次/日 | ||
* 云函数:40,000 GBs/月 | ||
|
||
Twikoo 云函数的内存消耗恒定为 0.1GB,由此可计算出 Twikoo 云函数每月有长达 400,000 秒的运行时长,而免费资源的瓶颈主要在数据库日读取次数限制。建议站长关注免费资源的使用情况。 | ||
|
||
## 如何启用 Katex 支持? | ||
|
||
Twikoo 支持 Katex 公式,但为了限制 Twikoo 的包大小,Twikoo 没有内置完整的 Katex,您需要[在页面中额外加载 katex.js](https://katex.org/docs/browser.html)。 | ||
|
@@ -101,6 +86,12 @@ Akismet (Automattic Kismet) 是应用广泛的一个垃圾留言过滤系统, | |
1. 注册 [akismet.com](https://akismet.com) | ||
2. 选择 Akismet Personal 订阅,复制得到的 Akismet API Key,到 Twikoo 管理面板“反垃圾”模块中配置 | ||
|
||
### 如何测试 Akismet 反垃圾配置是否生效? | ||
|
||
请填写 `viagra-test-123` 作为昵称,或填写 `[email protected]` 作为邮箱,发表评论,这条评论将一定会被视为垃圾评论。 | ||
|
||
需要注意的是,由于 Akismet 服务响应速度较慢(大约 6 秒),影响用户体验,Twikoo 采取 “先放行,后检测” 的策略,垃圾评论会在发表后短暂可见。 | ||
|
||
## 登录管理面板遇到错误 AUTH_INVALID_CUSTOM_LOGIN_TICKET | ||
|
||
一般是配置好登录私钥之后,又重新下载了登录私钥,导致之前配置的登录私钥失效了。<br> | ||
|
@@ -112,7 +103,9 @@ Akismet (Automattic Kismet) 是应用广泛的一个垃圾留言过滤系统, | |
|
||
为了避免频繁检查邮箱带来的性能问题,邮件配置有 10 分钟左右的缓存,如果确定配置没有问题,但测试失败,可以等待 10 分钟后再测试。 | ||
|
||
## Vercel 无法上传图片? | ||
由于博主发表评论时,不会通知博主,如果您想实际测试通知功能,请注销管理面板后用非博主邮箱发表或回复评论。 | ||
|
||
## Vercel、私有部署无法上传图片? | ||
|
||
腾讯云环境自带云存储,所以腾讯云环境下可以直接上传图片,图片保存在云存储中。然而 Vercel 环境没有,上传图片功能依赖第三方图床,请在管理面板中配置图床,Twikoo 支持以下图床: | ||
|
||
|
@@ -123,8 +116,10 @@ Akismet (Automattic Kismet) 是应用广泛的一个垃圾留言过滤系统, | |
| smms | https://sm.ms | SMMS 图床,有免费套餐,请自行注册账号,`IMAGE_CDN_TOKEN` 可在 [Dashboard](https://sm.ms/home/apitoken) 中获取 | | ||
| [lsky-pro](https://www.lsky.pro) | 私有部署 | 兰空图床 2.0 版本,`IMAGE_CDN` 请配置图床首页 URL 地址(如 `https://7bu.top`),`IMAGE_CDN_TOKEN` 获取方式请参考教程 [杜老师说图床:新版本去不图床 Token 的获取与清空](https://dusays.com/454/),获取到的 token 格式应为 `1\|1bJbwlqBfnggmOMEZqXT5XusaIwqiZjCDs7r1Ob5`) | | ||
|
||
## 能私有部署吗? | ||
## 私有部署能连接自己的数据库吗? | ||
|
||
不能。私有部署不需要连接外部数据库,数据存储在启动 twikoo 时所在目录下的 data 目录,您可以直接复制该目录以完成数据备份。 | ||
|
||
不能。如果您确实需要支持私有部署评论系统,请优先考虑其他评论系统。 | ||
twikoo 私有部署版使用内置数据库。如果连接外部数据库,会增加部署难度,导致诸如 _连接字符串不会配置、服务器内存不足、数据库版本不兼容、高 ping、连接不稳定_ 等麻烦事。 | ||
|
||
您可以在这个项目 [twikoo-docker](https://github.com/twikoojs/twikoo-docker) 中看到私有部署的实现进度。私有部署存在一系列问题,现阶段作者仍没有时间和精力解决。欢迎贡献。 | ||
twikoo 内置的数据库为 LokiJS 数据库,支持的数据库容量大约为 1 GB。 |
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 |
---|---|---|
|
@@ -45,7 +45,7 @@ exports.main = require('twikoo-func').main | |
8. 创建完成后,点击“twikoo"进入云函数详情页,进入“函数代码”标签,点击“文件 - 新建文件”,输入 `package.json`,回车 | ||
9. 复制以下代码、粘贴到代码框中,点击“保存并安装依赖” | ||
``` json | ||
{ "dependencies": { "twikoo-func": "1.6.4" } } | ||
{ "dependencies": { "twikoo-func": "1.6.5" } } | ||
``` | ||
|
||
### 命令行部署 | ||
|
@@ -208,7 +208,7 @@ twikoo: | |
|
||
``` html | ||
<div id="tcomment"></div> | ||
<script src="https://cdn.staticfile.org/twikoo/1.6.4/twikoo.all.min.js"></script> | ||
<script src="https://cdn.staticfile.org/twikoo/1.6.5/twikoo.all.min.js"></script> | ||
<script> | ||
twikoo.init({ | ||
envId: '您的环境id', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) | ||
|
@@ -226,10 +226,10 @@ twikoo.init({ | |
|
||
如果遇到默认 CDN 加载速度缓慢,可更换其他 CDN 镜像。以下为可供选择的公共 CDN,其中一些 CDN 可能需要数天时间同步最新版本: | ||
|
||
* `https://cdn.staticfile.org/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://cdn.bootcdn.net/ajax/libs/twikoo/1.6.4/twikoo.all.min.js` | ||
* `https://cdn.jsdelivr.net/npm/[email protected].4/dist/twikoo.all.min.js` | ||
* `https://cdn.staticfile.org/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://cdn.bootcdn.net/ajax/libs/twikoo/1.6.5/twikoo.all.min.js` | ||
* `https://cdn.jsdelivr.net/npm/[email protected].5/dist/twikoo.all.min.js` | ||
|
||
## 开启管理面板(腾讯云环境) | ||
|
||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const version = '1.6.4' | ||
const version = '1.6.5' | ||
|
||
export { version } |
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,6 +1,6 @@ | ||
{ | ||
"name": "twikoo-func", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "A simple comment system.", | ||
"author": "imaegoo <[email protected]> (https://github.com/imaegoo)", | ||
"license": "MIT", | ||
|
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
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 +1 @@ | ||
{ "dependencies": { "twikoo-vercel": "1.6.4" } } | ||
{ "dependencies": { "twikoo-vercel": "1.6.5" } } |
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,6 +1,6 @@ | ||
{ | ||
"name": "twikoo-vercel", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "A simple comment system.", | ||
"author": "imaegoo <[email protected]> (https://github.com/imaegoo)", | ||
"license": "MIT", | ||
|
@@ -12,7 +12,7 @@ | |
"homepage": "https://twikoo.js.org", | ||
"dependencies": { | ||
"mongodb": "^3.6.3", | ||
"twikoo-func": "1.6.4", | ||
"twikoo-func": "1.6.5", | ||
"uuid": "^8.3.2" | ||
} | ||
} |