Teach you how to build an efficient map bed at 0 cost

This time I will share with you a dry product: quickly build a free speed map bed!
Aha? Is there such a good thing? Maybe many people don't believe it, haha. The world can be seen, the young man is not deceived, let's listen to the breakdown of the unified brother below! (PS: There is a small benefit at the end of the article)

      Go straight to the topic, how to build it? Generally speaking, three tools are needed: GitHub, PicGo and jsDelivr. Among them, GitHub is used for storage, PicGo is used for uploading, and jsDelivr is used for acceleration.

One, Github

      GitHub is an ordinary image storage platform. Put the image on Github, and then use https://github.com/ZTY18873242003/img/2.jpg where you need to use the image (such as blog, yourself) Deployed project) reference. Well, the plan is indeed feasible, but the shortcomings are also obvious, and overall it is a bit slow .
      In that case, why use Github? Because of the large amount of space, is it not good to have 100G of free space on Github? If you use Alibaba Cloud's object storage service, you will be billed according to the flow rate. The longer you use it, the more money you will spend. Of course, you can also buy a cloud server to put the pictures on it, and then use the server IP + picture address to access, but then you also have to use FTP service to upload pictures to the server and then reference, it is more troublesome, so the free Github becomes The best choice for image storage. Then follow the steps below

1.1. Create a new warehouse and name itInsert picture description here

1.2, click Settings

Insert picture description here

1.3, click on Developer settings

Insert picture description here

1.4. Find the Token as shown in the pictureInsert picture description here

1.5. Fill in the Token information (describe what it is used for), click repo and then click Generate Token to create a Token

Insert picture description here
Insert picture description here

1.6. Save the token locally, it is best to create a new text document record, because the token will disappear when refreshing or closing the current page (forgot to save it, you can reset it in the settings)

Insert picture description here
     OK, Github configuration is over.

Two, PicGo

2.1. Download and install PicGo: https://github.com/Molunerfinn/PicGo

Insert picture description here
Click this link: Download the directory and find the 2.3.0-beta.4 version, choose different download sources for different systems of mac, linux, and windows. My win7 system directly selects the exe installation package file shown by the arrowInsert picture description here

2.2, configuration diagram bed

Insert picture description here

  1. Set the warehouse name according to the format of "Github account name/warehouse name"
  2. Fill in the branch name as master ( Note : GitHub has officially changed the default master branch master to main, so the warehouse built after 2020/10/1 must replace master with main in PicGo (Of course, you can also change the master branch in GitHub main changed to master)
  3. Copy the previous local Token here
  4. The storage path is written in the format on the picture (note that the / symbol must be written), it will create a folder under the previously created warehouse
  5. The function of the custom domain name is that after the image is uploaded successfully, PicGo will place the access link generated by "custom domain name + uploaded image name" on the clipboard
https://cdn.jsdelivr.net/gh/用户名/仓库名

Three, jsDelivr CDN acceleration

      Briefly introduce what CDN is and what it does.
      Here is a quote from Zhihu’s official account on Alibaba’s Taoxi technology : 98% of the traffic on Taobao’s image access goes through the CDN cache. Only 2% will return to the source site, saving a lot of server resources. It is not difficult to see that the direct function of CDN (full name Content Delivery Network) is to accelerate the speed of users' access to pictures. In addition, it can also play a certain security role, for example, it can protect the source station and reduce the probability of hackers attacking the source host. Assume a scenario below. When a hacker uses DDOS traffic to attack a website, if the site uses a large number of CDN servers, then the target of the attack is mostly the CDN server instead of the source host. This indirectly plays a protective role.
      After setting up the Github address on PicGo, you can use it. The uploaded pictures will be placed on Github. This jsDelivr is a free acceleration CDN. I used this acceleration when I deployed the Halo blog before, and it can also be skipped. The speed limit of Alibaba Cloud can be said to be a conscience project.
Insert picture description here
After the PicGo upload is successful, the side of the display will pop up Insert picture description here
and the pictures can also be seen in the album.
Insert picture description here
      End of the article benefits: Github domestic mirroring acceleration station ( do not know if it is the principle of CDN ), you can try it if the official website is too card.

Guess you like

Origin blog.csdn.net/Zhongtongyi/article/details/113831713