Tangwx

Tangwx

博客网站

Typora+PicGo+gitee, automatically upload images in Markdown.

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.#

image-20220807074716466

Step 2: Create a repository. This repository needs to be public, otherwise the images cannot be accessed after being placed.#

image-20220806183500707

image-20220806190559270

Then select "Manage".

image-20220806190646268

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.

image-20220806190743801

Step 3: Find the personal settings on the personal homepage and click on it.#

image-20220806191101433Step 4: After entering, select "Personal Token" and then select "Generate New Token".#

image-20220806191243870

Step 5: Create a personal token.#

image-20220806191435694

After submission, enter the password.

image-20220806191516881

The private token has been generated. At this time, copy your private token!!!

image-20220806192719513

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#

image-20220806193701421

Click on "Plugin Settings".

image-20220806193728289

"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.

image-20220806194414066

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.
image-20220806194837407

Enter cmd in the path bar and press Enter.

image-20220806194933262

image-20220806194951534

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.

image-20220806195141515

image-20220806195214649

You can also install other plugins, PicGo Plugin List

Restart picgo, then click Image Bed Settings -> Gitee to go to the following figure

image-20220806195835135

repo is the id of the repository address after creating the repository.

image-20220806200009970

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.

image-20220806200634140

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.

image-20220806201236724

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.

image-20220806201908025

You can see that the upload was successful.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.