typora+PicGo+gitee, Automatically Upload Images in Markdown#
When writing articles using typora, we often need to paste images. However, after pasting the images, they may not be displayed when uploaded to gitee or when sending the md file to someone else. In this case, it is very suitable to use picgo to upload to gitee, which 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 cannot be accessed after being placed.#
Then select "Manage".
Then select "Open Source". It is important to choose "Open Source"!!! Otherwise, the images will not be accessible after being placed.
Then check the "Repository Public Notice" and save.
Step 3: Find the 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. At this time, copy your private token!!!
Step 6: Download PicGo#
The download speed of GitHub is slow, so here I share the Baidu Cloud and Lanzou Cloud links.
Baidu Cloud 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".
"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: "picgo-plugin-gitee" and "picgo-plugin-gitee-uploader". The search service on npm may be down recently, and searching for gitee does not yield 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 under C:\Users\XXX\AppData\Roaming\picgo
, where XXX is the username of the computer. Modify it according to your own situation.
Here, I moved the location of 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
, 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 to go to the following figure
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 it.
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 resubmit to generate a new private token.
Finally, click OK, Set as Default Image Bed to complete the picgo settings.
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 according to the image, 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.
Note: Do not use double quotation marks.
At this point, the configuration of Typora+PicGo+gitee for automatically uploading images is complete.
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 was successful.
You can see that the upload was successful.