Tangwx

Tangwx

博客网站

Typora+PicGo+gitee, Automatic image uploading in Markdown

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

image-20220807074716466

Step 2 Create a repository. This repository needs to be public, otherwise the images will not be accessible after being put in.#

image-20220806183500707

image-20220806190559270

Then select "Manage".

image-20220806190646268

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.

image-20220806190743801

Step 3 Find 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, so copy your private token!!!

image-20220806192719513

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#

image-20220806193701421

Click on "Plugin Settings".

image-20220806193728289

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.

image-20220806194414066

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.
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, and 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, and you will see the following.

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.

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.

image-20220806200634140

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.

image-20220806201236724

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.

image-20220806201908025

You can see that the upload is successful.

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