MarkDown + PicGo image bed configuration

1. Markdown and Typora
Markdown itself is a lightweight markup language that simplifies writing, which allows us to write document content in an easy-to-read and easy-to-write plain text format. More and more writers are starting to use Markdown for creation, because its syntax is simple, the learning cost is low, and its functions are more powerful than plain text.

Nowadays, all major blog platforms or writing websites basically support online Markdown editors. Although the support for Markdown is relatively complete, online editors of Markdown will encounter such a pain point: adding pictures is cumbersome and needs to be selected one by one. image and upload it. Of course, there are also many local text editors that support Markdown. Whether it is Windows or Mac OS, there are many excellent Markdown editors. One of them I have to mention is Typora, which is a cross-Windows, OS X and Linux. The excellent editor of , its beautiful appearance and simple and elegant style really attracts countless fans. The local Markdown editor I use is Typora, which I usually use to take notes and write blogs. Especially when writing a blog, I hope that I can edit it once and then publish it to major platforms, but local pictures are not easy to deal with. At this time, I need a picture bed to solve the problem of local pictures. Under Mac OS, using Typora + iPic (Mac OS's built-in picture bed) can be easily solved. But under Windows, we need to choose the picture bed by ourselves.

Picture bed: generally refers to the server that stores pictures, so that we can access pictures through Markdown external links.
Typora under Windows did not support the function of uploading pictures before. It was not until the recent update of version 0.9.84 that it supported uploading pictures through PicGo. So please upgrade Typora to version 0.9.84 or later.
insert image description here

2. PicGo
1. Download PicGo
PicGo is a cross-platform image upload tool. Download PicGo from PicGo official website :
insert image description here

The download speed is impressive, please wait patiently. After the download is successful, just double-click to install.
insert image description here

2. Download node.js
PicGo is developed based on electron-vue, and it also supports the plug-in system to provide more powerful functions. The premise of using the plug-in is to install the node.js environment, because we need to use the plug-in when setting up the picture bed later function, so we need to install the node.js environment first, download and install it directly from the node.js official website:
insert image description here

3. Install the gitee plug-
in Now open the installed PicGo, and you can see that there are 8 image beds supported by the PicGo body. If you want to support other image beds, you need to use the plug-in function of PicGo.
insert image description hereThe choice of picture bed here varies from person to person, and you can choose whichever you like. This article introduces the picture bed built based on gitee (code cloud), which has the advantages of free and fast access. Click on the plugin settings, search for gitee, and two plugins appear. It is recommended that you download gitee 1.2.2-beta, because the subsequent configuration of the two plugins is slightly different.

Notice: The installation of the plug-in here must be based on the premise that the node.js environment is installed, otherwise the installation cannot be successful.

  • At this time, we can see the options of Gitee image bed in the image bed settings .

4. Set Server
Click PicGo Settings –> Set Server, and set the listening port to 36677:
insert image description here
insert image description here

3. Build the Gitee image bed
The author chooses Gitee to build the image bed here because it is free and has a fast access speed. First go to the Gitee official website to register a user and log in.

1. Create a repository (warehouse):

2. Generate a private token

Note: - After clicking submit, you need to enter the account password to generate a token - After generating the token, please save it immediately, because the token will not appear again 4.
Configure gitee image bed in PicGo
Configure gitee image bed information in PicGo:

After filling it out, set it as the default picture bed, and then test it, click the upload area, and you can click to select the picture upload or the clipboard picture upload:

To observe whether it is successful, first of all, PicGo will give a prompt, and then go to the warehouse to check whether the picture is uploaded successfully:

So far, PicGo can successfully upload pictures to gitee.

5. Configure PicGo in Typora
Open Typora, click Format –> Image –> Global Image Settings:

Follow the settings in the picture below to make your selection:

After the setting is complete, click to verify the image upload option. After success, the following prompt will appear:

Note: The port number used in the test command here is 36677, so the purpose of setting the port above is here.
Now when you insert a picture in Typora, it will automatically upload the picture to the gitee image bed, and automatically set the external link address of the picture to the picture address in the gitee warehouse. This solves the problem of using a local Markdown editor to process images.

Guess you like

Origin blog.csdn.net/mido94/article/details/113474920