Typora + picgo + GitHub to realize the effect of MD’s own drawing bed

Time:2020-4-24

1 GitHub creates a warehouse as a drawing bed

1.1 create a warehouse in GitHub

Note that if the warehouse is public, the uploaded image will not be available. If you don’t know how to create a warehouse, you can baidu.

1.2 generate a token in GitHub

This token is for picgo

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

Typora + picgo + GitHub to realize the effect of MD's own drawing bedTypora + picgo + GitHub to realize the effect of MD's own drawing bed

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

The page is pulled to the bottom with a green oneGenerate tokenButton. Click it to generate a token.

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

Copy the generated token for picgo to use.

Note: it is better to save the generated token locally, because the next time you enter GitHub, the token will no longer be displayed.

2 picgo client installation

Picgo download address, download the latest version of the. Exe installation package.

Set the GitHub table as the default table after installation.

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

Here are a few things to pay attention to:

  • The format of the warehouse name isGitHub user name \ warehouse name, there is no need to add HTTP in the front and. Git in the back.
  • The branch name uses the default main branchmaster
  • Token the token generated in GitHub in the previous step.
  • The specified storage path refers to the path in GitHub warehouse. I wroteimg/, so an img directory will be generated under my warehouse, and all pictures will be uploaded to this img directory. The specified storage path is not required and can be left blank.

3 typora settings

3.1 preferences

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

3.2 setting upload service

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

It can be used after settingVerify image upload optionsThat button is used to verify whether it can be uploaded successfully. Typora will upload an image, and success will return success information. If it fails, it’s probably that there’s something wrong with the configuration of the drawing bed on picgo. Check it.

3.3 set upload picture when inserting picture

I don’t know what this setting is for. After setting, I still need to manually click upload picture.

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

4 use

Typora + picgo + GitHub to realize the effect of MD's own drawing bed

After inserting a local image into the document, click this on the menuUpload pictureOptions. After the upload is successful, the local path will be automatically replaced with the URL address in the drawing bed.

5. Upload failure

If there are some successes and some failures, it’s probably because of GitHub’s network speed. Just wait a moment and upload it at another time. (it’s a bit hard to fail to upload all the time. I hope GitHub will land the new one in the Chinese market.)

If it has never been successful, check if picgo’s bed settings are correct.

This article is published by openwrite, an operation tool platform such as blog group post, one article multiple post, etc

Recommended Today

The bootstrap form label and input are displayed on one line

The bootstrap version used in this article is 4.4.1 1. Use form inline <form action=””> <div class=”form-group”> <div class=”form-inline”> < label class = “mb-2” > specification value: < / label > < input class = “form control MR-2 mb-2” type = “text” placeholder = “e.g. white” / > < input class = “form control MR-2 […]