Skip to content

Commit

Permalink
Update 2023-10-01-enhanced-cdn.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MHuiG committed Nov 7, 2023
1 parent b21e8dc commit 57fbebe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/_posts/blogs/2023-10-01-enhanced-cdn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: 根据md文件内的cdn链接(图片等并不在本地)自动
keywords: cdn失效 cdn 提高免费cdn稳定性 freecdn cdn.jsdelivr.net 实时切换到合适的CDN 远程图片
author: xingpingcn
link: https://xingpingcn.top/%E4%BD%BF%E7%94%A8freecdn-js%E6%8F%90%E9%AB%98hexo%E5%8D%9A%E5%AE%A2%E7%9A%84cdn%E7%A8%B3%E5%AE%9A%E6%80%A7.html
backup: https://web.archive.org/web/20231107000145/https://xingpingcn.top/%E4%BD%BF%E7%94%A8freecdn-js%E6%8F%90%E9%AB%98hexo%E5%8D%9A%E5%AE%A2%E7%9A%84cdn%E7%A8%B3%E5%AE%9A%E6%80%A7.html
---

由于`cdn.jsdelivr.net`在国内不太稳定,替代的`jsd.cdn.zzko.cn`稳定性稍好,但是也不是100%稳定,因而需要一个脚本实时切换到合适的CDN。[freecdn-js](https://github.com/EtherDream/freecdn)能实现这个需求,但是我的文件(图片、js等)储存在GitHub图床,而`freecdn-js`本身需要被加速的文件的`hash`,因此需要自己写脚本处理下载图片并计算。因为图片等文件的cdn链接是直接写在`.md`文件中的,所以写了一个正则脚本来提取cdn的链接。
Expand Down

0 comments on commit 57fbebe

Please sign in to comment.