I, EDITORIAL
Before writing blog when pictures are used in local, CSDN synchronization update when the need to manually upload pictures. Has been a useful 图床
idea, but have heard XXX图床gg了
, I have been very concerned about this issue. Recently I found a great method to build their own private view of the bed.
Second, create a repository GitHub map bed
Third, generate Access token
Then enter the personal account of Settings
:
Then select Developer settings
:
Then select Personal access tokens
:
Create a new token:
Then fill in the Note, and put repo
on a full hook.
Then click on the bottom of the page Generate token
, is generated, and remember to copy it, close the page will not see the back to use.
Fourth, the configuration PicGo, use the CDN jsDelivr
Download PicGo software installation.
Select the corresponding system version download, I use the Windows
system, it is directly under the exe
document.
Open PicGo of 图床设置
:
Enter your GitHub repository name, branch name written master
, Token, storage path to write img/
on the line. Because we need to use jsDelivr
for faster access, it will set a custom domain name https://cdn.jsdelivr.net/gh/用户名/图床仓库名
, configure:
Fifth, the use of private map bed
Click Upload area, select the map for the bed GitHub图床
, a link format Markdown
, directly drag the image into the box and wait for the upload is complete, automatically copied Markdown链接
, pasted directly into writing a blog on the line, very convenient.
Six tips
一开始我 GitHub 图床仓库设成 Private
,因为图片难免会带有一些私人信息,测试之后发现博客里并不能成功显示出来,后来我把仓库 Public
之后,就能成功显示了。所以图片上传图床要注意保护个人隐私。