GitHub builds a stable drawing bed, which is easy to test and use
I’ve used some drawing beds before, but they’re usually quite annoying, and it’s not convenient to write markdown blog. I found that vs code supports markdown blog writing, and supports one click upload to GitHub drawing bed, so it’s recorded!
1. Vscode plug-in picgo
You need to use the plug-in picgo to search and install directly in vscode.
2. GitHub configuration of picgo
Open the settings and find picgo’s settings in extensions
Drag down to find GitHub and configure it:
First, picgo core is set to
Branch uses git command
git branch -a
Check my branch and I’ll be a master, so I’ll fill in the master
Path should be used with repo, and the uploaded image will be sent to the repo + path directory. For example, my image will be sent to:
Next, you don’t need to open a repo separately, just add a directory.
Note that “/” is added after the path, otherwise the latter part will be merged as the image name. For example, path is set to:
When uploading world.png, the picture will become:
The last step is to regenerate a token from GitHub (the token only appears once). First open the settings from the Avatar:
Find the lowest developer settings:
Finally, copy the token to GitHub token in picgo settings. Then you can use the drawing bed in vscode.
Three brief commands:
CTRL + Alt + E // manually insert a picture from the file directory CTRL + Alt + U // insert picture from clipboard CTRL + Alt + O // insert a picture from the input directory, either relative or absolute