jsdelivr https://www.jsdelivr.com/
下面就以舉例子的方式說明
我是用 jsdelivr 來訪問 github的資源,做博客來着
我的github https://github.com/yuDuChen/yuduchen
下面直接說怎么用jsdelivr,就不提如何創建github了
首先需要創建 releases
創建完,隨便進入到一個文件,注意地址名
https://github.com/yuDuChen/yuduchen/blob/v1.5.6/layui/layui.js
這個地址用jsdelivr來訪問
https://cdn.jsdelivr.net/gh/yuDuChen/yuduchen@v1.5.6/layui/layui.js
對比一下就發現怎么用了吧
注* 不使用jsdelivr直接引用github的文件 content-type 是 text/plain 頁面無法解析