[Experience] Blog|Use dotnet-cnblog to upload Gitee picture bed pictures and local pictures to the blog garden

If you are on the Gitee image bed, you need to clone it to the current directory. In essence, you still upload the local image to the blog garden.

Use the tool dotnet-cnblogs.

Reference: A new version of the local upload tool for Markdown images in Blog Park has been released .

The tool is open source, source code address: https://github.com/stulzq/dotnet-cnblogs-tool .

Install:

dotnet tool install --global dotnet-cnblog

Steps for usage:

(0) For the first use, you need to enter the user name and password ( note: it is not a login password, but a token )).

Token creation method: https://account.cnblogs.com/settings/account/personal-access-token in the blog garden background .

(1) Clone the Gitee map bed image to the local:

git clone <图床仓库>

Then replace the image path in the md file with a local ../relative path with one click.

(2) Use dotnet-cnblog to directly upload the image file of the md document and automatically replace the link:

dotnet-cnblog proc -f <需要解析的md文件>

Pictures that are already blog garden pictures will not be uploaded again, and the result is shown in the following figure:

insert image description here

Guess you like

Origin blog.csdn.net/qq_46106285/article/details/125589784