1

jsdelivr+PicGo+github打造图床(白嫖强推)

 1 year ago
source link: https://lzh-style.github.io/2021/10/23/picgo/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1.下载PicGo

首先你需要下载一款上传图片的软件 这里我强推这款开源工具PicGo这里是地址根据需要下载你需要的版本即可

202202232225718.png

PicGo是一个用于快速上传图片并获取图片URL链接的工具,目前支持微博图床、七牛图床、腾讯云、又拍云、GitHub、阿里云等图床

这里我只介绍Github

2.Github

首先你需要在Github上单独建立一个public仓库,具体如下,可任意修改

接下来要获得你的token

进入设置里面如下

然后取名字note 只需要勾选repo狂即可,就可生成令牌token 需要记住

3.配置PicGo

1.github设置
  1. 仓库名是 github名称/刚才你设置的仓库名称
  2. 分支名填main
  3. token粘贴你获取到的即可
  4. 示例:img/ 或者你想填的路径
  5. 这种形式 https://cdn.jsdelivr.net/gh/用户名/github仓库名
2.PiGo设置

4.如何使用

1.上传图片

根据页面提示上传即可

2.通过jsDelivr引用资源

有不同连接可任意生成

如下url形式

https://cdn.jsdelivr.net/gh/你的用户名/你的仓库名/文件路径

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK