It has been 1777 days since the last update, the content of the article may be outdated.
下面我面来使用jsDelivr+Github
搭建免费CDN
新建Github仓库
克隆仓库到本地
在本地新建一个文件夹,在文件内打开Git Bash Here
,然后执行命令
Code
1 | git clone git@github.com:PaddyLin-xum/jsCDN.git |
上传资源
复制需要上传的资源到本地文件夹,在本地文件夹目录下右键Git Bash Here
,执行以下命令:
Code
1 | git add . //添加所有文件到暂存区 |
发布仓库
通过jsDelivr引用资源
使用方法:https://cdn.jsdelivr.net/gh/你的用户名/你的仓库名@发布的版本号/文件路径
,例如
Code
1 |  |