Typora+Gitee+PicGo to build a picture bed

introduction

Since gitee has now added an anti-leech link and only supports 1M pictures, some pictures of Typora may not be displayed (sm.ms seems to be fine, github network speed is not stable, you can buy Tencent Cloud or Alibaba Cloud, etc.)

In principle, markdown does not recommend using base64 embedded images, because it is too troublesome.

If you are only browsing and editing locally, you can use a relative or absolute path, but considering the need to publish and share, using a picture bed is a better solution.

This tutorial can quickly get a relatively stable free image bed, does not require a registered domain name, and is relatively stable among the free image beds.

The following is a comparison between GitHub and SM.MS as a personal free image bed,

image-20230119195208799

Due to indescribable reasons, the access speed of GitHub in China is not very stable, and SM.MS is a free image bed project launched by V2EX boss @Showfom in 2014. Currently, the access speed in China is relatively fast, and occasionally it may not be available In this case, the personal free quota is 5G.

It is faster and more stable to visit gitee in China. The following uses Gitee to build (Github and SM.MS map bed can be built in this article: Use of GitHub&SM.MS map bed ).

1. Configure Gitee and get token

register

Enter Gitee official website: workbench-Gitee.com registered account

new warehouse

Used to save pictures uploaded by Typora

image-20230119195256142

Fill in all kinds of information, and pay attention to the warehouse name not to have capital underscores like the following

image-20230119195524532

Change the warehouse to open source after the new creation is complete

image-20230119195552394

generate token

image-20230119195615461

image-20230119195637040

image-20230119195657906

image-20230119195711853

Remember to save the token after it is generated, it will not appear again later

2. Install PicGo

This is an open-source tool for local image upload and image bed management. It supports markdown, html, url and other formats. Address: https://github.com/Molunerfinn/PicGo/releases , just select the corresponding version to download, such as windows Select PicGo-Setup-2.2.2.exe for the version, skip the installation process.

3. Install Node.js

Install node.js in https://nodejs.org/zh-cn and select the long-term support version.

image-20230119195831939

Verify installation:

node -v

If the version number appears, it means success

image-20230119200057375

4. Install the gitee plugin in picgo

Search for gitee in the plug-in settings on the left side of picgo, and you will find that it cannot be installed, or there is no response

image-20230119200246159

Manually install the PicGo plugin

First make sure to install Node.js, Win+R key, enter cmd to call the command line window, enter npm -v to display the version number, indicating that you can use npm

image-20230119200321553

Then go to the windows configuration directory in C:\Users\XXX\AppData\Roaming\picgo , XXX is the user name of the computer, you can modify it according to your own situation
cd C:\Users\XXX\AppData\Roaming\picgo

image-20230119200346290

Finally, in this directory, use npm to manually install the gitee image bed, the command is as follows:

npm install picgo-plugin-gitee-uploader

Then restart picgo.

5. Configure PicGo

Click on gitee on the left to enter – edit

enter:

​ username/warehouse name

​ The previously generated token

​ storage folder

image-20230119200417721

Set as the default drawing bed after completion

Finally, set typora as follows

image-20230119200502217

Then click the verify image upload option to test whether the upload is successful

image-20230119194824273

image-20230119200608052

Supongo que te gusta

Origin blog.csdn.net/weixin_55988897/article/details/128737358
Recomendado
Clasificación