Use github to store online pictures for markdown files to use
Use github to store online pictures for markdown files to use
When editing a markdown file, the entire text is a little boring, and sometimes you need to add some pictures to make the whole text more vivid. Some people can add local pictures, but once the image path changes, the original text will not be able to view the picture, so you can store the picture on the Internet and call it to make sure it is used.
Upload pictures to github
Here you need to create a repository on your github, such as pic
Configure config (the machine that just installed git needs to be set up)
Git config user.name YOUR-USER-NAME-OF-GITHUB
Git config user.email YOUR-EMAIL-OF-GITHUB
Test git remote warehouse
# echo "# pic" > > README.md
# git init
# git add README.md
# git commit-m "first commit"
# git remote add origin https://github.com/castiel-Lu/pic.git( this is my pic repository link, replace it with your git connection)
# git push origin master
Upload pictures
# git add choose_os.png
# git commit-m "add choose_os.png"
# git push origin master
Get a link
Find the picture file just uploaded on the github website, click, the picture appears; right-click the picture, copy the picture address, this address can be used on markdown and displayed!
Markdown picture syntax:! [picture description] (picture address)
For more markdown image insertion methods, please see: https://www.zhihu.com/question/21065229