From 484c0577315e7831803876462c49bed1f9e8781d Mon Sep 17 00:00:00 2001 From: iMaeGoo Date: Mon, 11 Jan 2021 13:42:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(doc):=20=E5=AE=8C=E5=96=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3=20=E4=BC=98=E5=8C=96=E8=AF=84=E8=AE=BA=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=20=E5=8F=91=E5=B8=83=E6=AD=A3=E5=BC=8F=E7=89=88=20(#1?= =?UTF-8?q?00)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 改进 异步发送评论通知,加快评论响应速度 * 文档 完善文档 --- LICENSE | 2 +- docs/.vuepress/theme/layouts/Layout.vue | 2 +- docs/quick-start.md | 32 +++++++++++++++++++++---- package.json | 2 +- src/function/twikoo/LICENSE | 21 ++++++++++++++++ src/function/twikoo/README.md | 6 +++++ src/function/twikoo/index.js | 20 ++++++++++++---- src/function/twikoo/package.json | 2 +- src/view/components/TkAdminConfig.vue | 2 +- 9 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 src/function/twikoo/LICENSE create mode 100644 src/function/twikoo/README.md diff --git a/LICENSE b/LICENSE index ed5f9ffab..f387b7b62 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 iMaeGoo +Copyright (c) 2020-present iMaeGoo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue index e3c02793b..cb0184835 100644 --- a/docs/.vuepress/theme/layouts/Layout.vue +++ b/docs/.vuepress/theme/layouts/Layout.vue @@ -6,7 +6,7 @@
- + diff --git a/docs/quick-start.md b/docs/quick-start.md index 1cd48c7f8..e9d26b8f6 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -24,7 +24,7 @@ Twikoo 分为云函数和前端两部分,部署时请注意保存二者版本 ### 手动部署 -如果您打算部署到一个现有的云开发环境,请直接从第 5 步开始。 +如果您打算部署到一个现有的云开发环境,请直接从第 3 步开始。 1. [注册云开发CloudBase](https://curl.qcloud.com/KnnJtUom) 2. 进入[云开发控制台](https://console.cloud.tencent.com/tcb/),新建环境,请按需配置环境
@@ -45,7 +45,7 @@ exports.main = require('twikoo-func').main 8. 创建完成后,点击“twikoo"进入云函数详情页,进入“函数代码”标签,点击“文件 - 新建文件”,输入 `package.json`,回车 9. 复制以下代码、粘贴到代码框中,点击“保存并安装依赖” ``` json -{ "dependencies": { "twikoo-func": "0.6.0" } } +{ "dependencies": { "twikoo-func": "1.0.0" } } ``` ### 命令行部署 @@ -58,7 +58,7 @@ exports.main = require('twikoo-func').main * 请勿在 Termux 下操作。虽然可以部署成功,但是使用时会报错 `[FUNCTIONS_EXECUTE_FAIL] Error: EACCES: permission denied, open '/var/user/index.js'` ::: -如果您打算部署到一个现有的云开发环境,请直接从第 5 步开始。 +如果您打算部署到一个现有的云开发环境,请直接从第 3 步开始。 1. [注册云开发CloudBase](https://curl.qcloud.com/KnnJtUom) 2. 进入[云开发控制台](https://console.cloud.tencent.com/tcb/),新建环境,请按需配置环境
@@ -98,7 +98,7 @@ Volantis 目前支持 Twikoo,请查看 [hexo-theme-volantis/_config.yml](https ``` yml comments: twikoo: - js: https://cdn.jsdelivr.net/npm/twikoo@0.6.0/dist/twikoo.all.min.js + js: https://cdn.jsdelivr.net/npm/twikoo@1.0.0/dist/twikoo.all.min.js envId: xxxxxxxxxxxxxxx # 腾讯云环境id ``` @@ -111,6 +111,28 @@ twikoo: envId: xxxxxxxxxxxxxxx # 腾讯云环境id ``` +### 在 Hexo NexT 主题使用 + +在 Hexo 项目根目录执行 `npm install hexo-next-twikoo`,然后在配置中添加 + +``` yml +twikoo: + enable: true + visitor: true + envId: xxxxxxxxxxxxxxx # 腾讯云环境id + # region: ap-guangzhou # 环境地域,默认为 ap-shanghai +``` + +### 在 Hexo Matery 主题使用 + +``` yml +twikoo: + enable: true + envId: xxxxxxxxxxxxxxx # 环境 ID,搭建教程:https://twikoo.js.org/quick-start.html + # region: ap-guangzhou # 环境地域,默认为 ap-shanghai + # path: 'window.location.pathname' # 自定义文章路径 +``` + ### 在 Hexo Icarus 主题使用 请参考 [基于腾讯云,给你的 Icarus 博客配上 Twikoo 评论系统](https://anzifan.com/post/icarus_to_candy_2/) by 异次元de机智君💯 @@ -123,7 +145,7 @@ twikoo: ``` html
- +