typora+PicGo+gitee, Markdown automatic image upload#
When writing articles with typora, we often need to paste images. However, after pasting the images, there may be situations where the images cannot be displayed when uploaded to gitee or when sending the md file to someone else. At this time, it is very suitable to use picgo to upload to gitee, which is very suitable for people who need to upload documents to gitee, and it is both free and easy to use. So how do we operate? The following is the operation process.
Step 1, we need to have a gitee account. The reason for choosing gitee is because it is a domestic platform with fast access speed! Gitee.#
Step 2 Create a repository. This repository needs to be public, otherwise the images will not be accessible after being put in.#
Then select "Manage".
Then select "Open Source". It is important to select "Open Source"!!! Otherwise, the images will not be accessible after being put in.
Then check the "Repository Public Notice" and save.
Step 3 Find personal settings on the personal homepage and click on it.#
Step 4 After entering, select "Personal Token" and then select "Generate New Token".#
Step 5 Create a personal token.#
After submission, enter the password.
The private token has been generated, so copy your private token!!!
Step 6 Download PicGo#
The download speed of github is slow, so here I share the Baidu Netdisk and Lanzou Cloud links.
Baidu Netdisk sharing link: Link: https://pan.baidu.com/s/1fQ6P4hpPj3bQNQ1jVQq23A?pwd=lt10
Extraction code: lt10
Lanzou Cloud link:
https://wwlx.lanzoul.com/iA9bv0tukyod
Password: 76m9
Step 7 Configure PicGo#
Click on "Plugin Settings".
The Gitee
image bed is not in the list of PicGo image beds, so it needs to be added through plugin settings. However, you must install Node.js
before installing PicGo plugins, because PicGo uses npm
to install plugins. To install, see the following address: Node.js download address.
After installing Node.js
, search for gitee
in the PicGo plugin settings. There should be two options, one is picgo-plugin-gitee
, and the other is picgo-plugin-gitee-uploader
. Here comes the important part. It is possible that the search service on the npm side has crashed, and searching for gitee does not return any results, which is frustrating!
Manually install PicGo plugins#
So this article records how to manually install PicGo plugins!
First, make sure Node.js is installed. Press Win+R, enter cmd to call the command prompt, and enter npm -v to display the version number, indicating that your npm can be used.
You can see that my version is 6.13.4.
Then go to the windows configuration directory and go to C:\Users\XXX\AppData\Roaming\picgo
. XXX is the username of the computer, modify it according to your own situation.
Here I moved the Roaming
folder.
Enter cmd in the path bar and press Enter.
Finally, use npm to manually install the gitee image bed. The command is as follows:
npm install picgo-plugin-gitee-uploader
, and then restart picgo and search for gitee again to see that it has been installed.
You can also install other plugins, PicGo Plugin List
Restart picgo, then click Image Bed Settings -> Gitee, and you will see the following.
repo is the id of the repository address after creating the repository.
branch is default to master, if there are no other branches, no need to change.
token is the content copied from the private token in step 5. If the copy is lost, you can go back to step 5 to select modify and submit to generate a new private token.
Finally, click OK, Set as Default Image Bed to complete the configuration of picgo.
Step 8 Typora configuration#
Note that the files here will generate an upload
folder in the current open file location, and subsequent md files can only be written in this folder.
Click File -> Preferences -> Images in order.
Set as shown in the figure, where PicGo Path is the installation location of PicGo.exe.
The way to view it is to right-click on the desktop PicGo icon -> select Properties, and the selected part is the PicGo Path.
Be careful not to use double quotes.
By now, Typora+PicGo+gitee automatic image upload is done.
Let's paste an image to test it.
Then right-click to upload the image.
We can go to the gitee repository to see if the upload is successful.
You can see that the upload is successful.