Typora + Qiniu Yuntu bed quick configuration, bid farewell to manually uploading pictures!

Hello everyone, I am zeroing. This article will introduce how to configure the Qiniu Yuntu bed with Typora software to realize plug-and-play pictures. You can take a look at the final result first!

c demo

You can see that the pictures are automatically converted from local storage to third-party picture network links with the help of Typora software

Before starting the tutorial, let me introduce Typora and Qiniu Cloud. Typora is a Markdown editor for Markdown document editing and reading. This software is currently my common software for writing documents.

Snipaste_2020-12-19_11-13-14

In addition to the basic syntax support for Markdown, the software also provides many theme templates. Combined with the provided theme templates, there is no need for manual typesetting. You only need to change the CSS styles in the theme templates to output a good-looking article, and you only need to set it once can

Snipaste_2020-12-19_11-09-33

For those who are not very clear about Markdown syntax, you can find out on Baidu

Qiniu Cloud is an enterprise-level cloud service provider, and this article only uses the image bed tool inside, ( 图床一般指存储图片的服务器,把本地图片上传到服务器上生成 http/htpps 网页链接); when using it, you need to purchase the cloud storage space of the corresponding cloud service provider. Qiniu Cloud will have 10G per account per month Large and small free storage, as long as the normal use of 10G storage space is enough (of course, excluding uploading high-definition pictures, a few MB of the kind), if it is not enough, you can buy later

With the help of the image bed tool, images can be converted into web links, and then using Markdown grammar to insert image links into the article, there is no need to manually upload the images to the article one by one, saving article layout time

Why choose Qiniu Cloud?

In fact, you can choose Alibaba Cloud or Tencent Cloud cloud service providers, as long as the server storage is stable; the image bed tool used before is a plugin of Google 新浪微博图床, this plugin is free (you need to log in to your Weibo account), use it to drag pictures into Window, plug-in can automatically convert pictures into web links, the tool is small and simple, and it is also a good image bed tool

Snipaste_2020-12-19_11-39-39

However, this tool has the following disadvantages:

  • 1. The operation is relatively cumbersome; for example, if I want to upload a picture, I need the following steps:

    • 1. Open the plugin,

    • 2. Drag the picture,

    • 3. Login account,

    • 4. Copy the Markdown link,

    • 5. Paste the link in step 4 into the Markdown syntax;

      I need to perform 5 operations to upload a picture, but I hope it can be done in just one step, that is, drag the picture into the Markdown grammar to automatically convert it into a network link, but unfortunately this plug-in cannot achieve this at present;

  • 2. This plug-in does not support https protocol network links, only http protocol; https is safer than http and is encrypted; for example, in my personal website, if http link appears in the article, the navigation information will appear in the header of the page 不安全Logo

    Snipaste_2020-12-19_11-58-21

  • 3. Unstable, the pictures are hosted on Sina Tubo's server, and you cannot determine when your pictures will expire and be deleted; for example, when Sina Weibo Tubo opens the anti-leech link once, a large number of external pictures will not work properly Use; so the most robust and affordable method is to build a storage object with the help of a third-party platform


Test domain configuration

The above is so long and long, I mainly give a brief introduction to Typora and the image bed tool. The following is a formal configuration tutorial

Before starting the configuration, you need to meet the following requirements ( Requirement 3 is not necessary, but it would be better if you have it. Requirements 1, 2 are just to test the usability of the Qiniu Yuntubed tool )

  • 1. Typora 0.9.96 and above (version 0.9.96 and above only support third-party platform image bed configuration);
  • 2. Register for a Qiniu Cloud account and complete the real-name authentication (only the account that has completed the real-name authentication will have 10G of free storage space for each subsequent month);

Snipaste_2020-12-19_12-17-59

  • 3. A registered domain name (used to add a custom domain name and configure the HTTPS protocol);

Qiniu Cloud

Before proceeding with the following operations, please make sure that you can meet the requirements 1 and 2 above; then first log in to Qiniu Cloud and enter the management consoleSnipaste_2020-12-19_12-20-39

Click Object Storage Kodo in the left column

Snipaste_2020-12-19_12-21-27

Click on the left of the space managementSnipaste_2020-12-19_12-22-35

Click on the new space above , fill in the basic information of the new storage space on the right ,

  • Name the storage space, name it yourself;
  • Storage Area : try to choose 华东、华北、华南one of the (here need to remember that the area corresponding to the number configuration will be used later in East -a0; North -a1; South China -a2 );
  • Access control: public;

Snipaste_2020-12-19_12-24-44

Click above to determine later, the back will pop up a space to create a successful reminder , the system provides prompts automatically with a test domain, valid for 30 days, in other words, this test domain name can only be used for 30 days, 30 days after the test domain will be resumed official website , That is, the image link uploaded through this domain name will be invalid , so before using the image bed tool, try to use your own registered domain name as the configuration domain name of the space

Snipaste_2020-12-19_12-40-46

After the space is created, enter the overview of the space just created, here you need to remember a few parameters for the following Typora software configuration

  • Space name
  • CDN test domain name;
  • The number corresponding to the storage area;

Snipaste_2020-12-19_12-49-34

In addition to the above three parameters, two parameters are required to enter the key management of the user center ;

Snipaste_2020-12-19_12-49-34

Remember the AK and SK parameters inside

Snipaste_2020-12-19_12-51-50

Typora configuration

After knowing the above 5 parameters, you need to configure the above parameters to the Typora software, open the Typora software, and click File -> Preferences -> Image . The basic configuration is shown in the figure below;

Snipaste_2020-12-19_12-56-23

Click on the figure to download the update , wait for the update to download, click after the completion open the configuration file ,

Snipaste_2020-12-19_13-03-07

The computer will automatically open a configuration file ( it is empty at the beginning ), and fill in the 5 parameters mentioned above in the corresponding positions of the json characters below in turn

Snipaste_2020-12-19_13-01-45

{
  "picBed": {
    "uploader": "qiniu",
    "qiniu": {
      "accessKey": "",
      "secretKey": "",
      "bucket": "", // 存储空间名
      "url": "", // 自定义域名
      "area": "", // 存储区域编号
      "options": "", // 网址后缀,比如?imgslim
      "path": "img/" // 自定义存储路径,比如 img/
    }
  },
  "picgoPlugins": {}
}

Completed, the shortcut Ctrl + S to save, click on the upload settings service verification image upload option , there is no error which represents the successful configuration

Snipaste_2020-12-19_13-03-07

Snipaste_2020-12-19_13-08-19

So far, the configuration method of typora and Qiniu Yuntu bed (based on Qiniuyun's test domain name) is basically over. You can realize the automatic conversion of image network links by dragging and dropping pictures!


Add an adaptive domain name and set the HTTPS protocol

One point is mentioned in the above configuration method. The test link provided by Qiniu Cloud is used in the above configuration process, which is only valid for 30 days, and the image storage link is HTTP protocol. If the web page link is insecure, it may be blocked by some websites.

If you want to use the Qiniu cloud map bed tool for a long time, you need to configure our own domain name. The domain name can be bought from Alibaba Cloud and Tencent Cloud cloud server vendors, and it is also very cheap for a few dollars a year; but the configured domain name needs to be filed , which will be introduced in the next section How to add a custom domain name in Qiniu Cloud and how to configure HTTPS protocol

1. Subdomain SSL certificate application

When configuring the HTTPS protocol, CNAME resolution (DNS resolution) is required later, but the main domain name is generally used to build a personal website or blog. When creating a website, domain name resolution is required to convert the domain name to an IP address . The resolved domain name is then used as the CNAME of Qiniu Cloud There will be conflicts during resolution, so an unresolved second-level domain name is needed here, such as images.xxx.com (xxx.com is the primary domain name after filing)

Snipaste_2020-12-19_14-49-35

2. Configure the SSL certificate of the second-level domain name

When seven cattle cloud custom domain configuration HTTPS protocol, you need to upload SSL certificate, a domain binding an SSL certificate, free SSL security certificate Ali, Tencent and other cloud server providers are usually non-wildcard domain name , you need to apply a mix of two SSL security certificate for the domain name

Taking Alibaba Cloud as an example, the SSL certificate application configuration process for the second-level domain name is as follows:

Snipaste_2020-12-19_15-41-11

Snipaste_2020-12-19_15-52-07

Snipaste_2020-12-19_15-52-50

After the configuration of the second-level domain name is purchased, download the SSL certificate of the second-level domain name to the local, usually stored in the form of a compressed package, and use decompression software to decompress;

Go to seven cattle cloud Snipaste_2020-12-19_15-48-52to cloud seven cattle site, the SSL certificate authority, add the local SSL certificate

Snipaste_2020-12-19_15-45-54

Snipaste_2020-12-19_15-46-04

Snipaste_2020-12-19_15-46-31

  • Certificate remarks name , just pick a name without special requirements;
  • The content of the certificate corresponds to the content in the pem file in the downloaded SSL certificate;
  • The certificate private key , the content in the key file,

Snipaste_2020-12-19_16-08-51

3. Custom domain name settings, HTTPs protocol configuration

Open seven cattle cloud created space overview , click the domain name management , click on parked domain

Bind domain name

Modify according to your own situation according to the following template

Snipaste_2020-12-19_16-11-03

After the binding is completed, only one step is needed for CNAME resolution

Snipaste_2020-12-19_16-25-12

Copy the CNAME content in the picture and go to the cloud server provider for DNS resolution

Snipaste_2020-12-19_15-53-03

Snipaste_2020-12-19_15-53-25

Snipaste_2020-12-19_15-53-58

Snipaste_2020-12-19_16-21-42

After DNS resolution is completed, wait for a while, the following effect appears, which means the configuration is successful!

result

After binding your domain name, modify the three parameters in the Typora configuration file, namely: 域名、空间名称、及对应的存储区域编号three parameters, save the configuration file and verify the others unchanged; after the verification is successful, you can use it normally.

I just wanted to briefly introduce Typora and Qiniu Yuntu bed configuration tutorial. I wrote that I found that there were more and more points that need to be written, and then I wrote it here; in order to let everyone understand what I wrote, I inserted a lot of pictures. , The image storage capacity of Qiniu Cloud’s background is also rising

Snipaste_2020-12-19_16-51-48

Therefore, it is recommended that when inserting images with the image bed tool, try to use screenshots instead of high-definition images when there is no special scene. Although the 10G storage space looks a lot, it is not in actual use. Of course, the local tyrant can completely ignore it.

Okay, the above is the entire content of this article. If you think the article is good, please don't be stingy with your hands. Welcome everyone to like, leave a message, and forward. Finally, thank you for reading!

Guess you like

Origin blog.csdn.net/weixin_42512684/article/details/111413918