-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Remove bootcdn and staticfile CDN (#723)
* Update frontend.md * Update frontend.md * add SRI
- Loading branch information
1 parent
885654d
commit c24151f
Showing
4 changed files
with
8 additions
and
8 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> | ||
<title>Twikoo Demo</title> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.staticfile.net/bulma/0.8.2/css/bulma.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.8.2/css/bulma.min.css" integrity="sha384-ot6RguV46OXVI/scORL3MF0W76aCi4XLFeX3mRArMs/+rNzCpVaOFDtfitKy47nn" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<link rel="stylesheet" type="text/css" href="demo.css"> | ||
</head> | ||
|
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 |
---|---|---|
|
@@ -68,11 +68,11 @@ onMounted(() => { | |
<component :is="'script'" defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></component> | ||
|
||
<!-- lightGallery --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/lightgallery.css"> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected]/lightgallery.min.js"></component> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/lightgallery.css" integrity="sha384-U8ohOXEVyF0NGY2LQnH83V4wGxOmFhim4U5xhfE/WDCHdPO2iUKPPYkhpDl9U/Yf" crossorigin="anonymous"> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected]/lightgallery.min.js" integrity="sha384-l5lFB9srHFAyvfCoHya9X1JwGGTNPvDtikieqZp7qu/bomCw0e0+yoyiL0f7UXLD" crossorigin="anonymous"></component> | ||
|
||
<!-- Twikoo --> | ||
<div id="twikoo"></div> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.min.js" ref="twikooJs"></component> | ||
<component :is="'script'" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/twikoo.min.js" integrity="sha384-ocJyLUeo5I91x224iE/ke7PPHyXVSUKNL7GfqnEto/HxGuBLnLLlitt3dFT/Zwrn" crossorigin="anonymous" ref="twikooJs"></component> | ||
</div> | ||
</template> |
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 |
---|---|---|
|
@@ -93,7 +93,7 @@ twikoo: | |
|
||
``` html | ||
<div id="tcomment"></div> | ||
<script src="https://cdn.staticfile.net/twikoo/1.6.36/twikoo.all.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.36/dist/twikoo.all.min.js" integrity="sha384-4KfOjEinLSkv1i1J8TzlkC/RTnuiLoR1OLerVgjEKoH5djYtbf7mzEFsz9p3nfuA" crossorigin="anonymous"></script> | ||
<script> | ||
twikoo.init({ | ||
envId: '您的环境id', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) | ||
|
@@ -111,11 +111,11 @@ twikoo.init({ | |
|
||
如果遇到默认 CDN 加载速度缓慢,可更换其他 CDN 镜像。以下为可供选择的公共 CDN,其中一些 CDN 可能需要数天时间同步最新版本: | ||
|
||
* `https://cdn.staticfile.net/twikoo/1.6.36/twikoo.all.min.js` | ||
* `https://lib.baomitu.com/twikoo/1.6.36/twikoo.all.min.js` | ||
* `https://cdn.bootcdn.net/ajax/libs/twikoo/1.6.36/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) 属性以确保完整性。 | ||
## 开启管理面板(腾讯云环境) | ||
|
||
1. 进入[环境-登录授权](https://console.cloud.tencent.com/tcb/env/login),点击“自定义登录”右边的“私钥下载”,下载私钥文件 | ||
|
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