-
Notifications
You must be signed in to change notification settings - Fork 318
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
1 changed file
with
17 additions
and
5 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 |
---|---|---|
|
@@ -88,12 +88,12 @@ twikoo: | |
## 通过 CDN 引入 | ||
|
||
::: tip 提示 | ||
如果您使用的博客主题不支持 Twikoo,并且您不知道如何引入 Twikoo,您可以[在 Github 提交适配请求](https://github.com/twikoojs/twikoo/issues/new) | ||
如果您使用的博客主题不支持 Twikoo,并且您不知道如何引入 Twikoo,您可以向博客主题开发者提交适配请求 | ||
::: | ||
|
||
``` html | ||
<div id="tcomment"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.all.min.js" integrity="sha384-4KfOjEinLSkv1i1J8TzlkC/RTnuiLoR1OLerVgjEKoH5djYtbf7mzEFsz9p3nfuA" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.all.min.js"></script> | ||
<script> | ||
twikoo.init({ | ||
envId: '您的环境id', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) | ||
|
@@ -105,17 +105,29 @@ twikoo.init({ | |
</script> | ||
``` | ||
|
||
> 建议使用 CDN 引入 Twikoo 的用户在链接地址上锁定版本,以免将来 Twikoo 升级时受到非兼容性更新的影响。 | ||
### 更换 CDN 镜像 | ||
|
||
如果遇到默认 CDN 加载速度缓慢,可更换其他 CDN 镜像。以下为可供选择的公共 CDN,其中一些 CDN 可能需要数天时间同步最新版本: | ||
|
||
* `https://s4.zstatic.net/ajax/libs/twikoo/1.6.38/twikoo.all.min.js` | ||
* `https://registry.npmmirror.com/twikoo/1.6.38/files/dist/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.38/twikoo.all.min.js` | ||
* `https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.all.min.js` | ||
|
||
> 建议使用 CDN 引入 Twikoo 的用户参考上一段的示例在代码中加入 [SRI](https://developer.mozilla.org/zh-CN/docs/Web/Security/Subresource_Integrity) 属性以确保完整性。 | ||
::: warning 注意 | ||
建议使用 CDN 引入 Twikoo 的用户在链接地址上锁定版本,以免将来 Twikoo 升级时受到非兼容性更新的影响。 | ||
::: | ||
|
||
::: warning 注意 | ||
建议使用 CDN 引入 Twikoo 的用户在代码中加入 [SRI](https://developer.mozilla.org/zh-CN/docs/Web/Security/Subresource_Integrity) 以确保完整性,例: | ||
```html | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.all.min.js" | ||
integrity="sha384-4KfOjEinLSkv1i1J8TzlkC/RTnuiLoR1OLerVgjEKoH5djYtbf7mzEFsz9p3nfuA" | ||
crossorigin="anonymous"></script> | ||
``` | ||
其中 `integrity` 的值可以在 [SRI Hash Generator](https://www.srihash.org/) 查询。 | ||
::: | ||
|
||
## 开启管理面板(腾讯云环境) | ||
|
||
|