如何在github存储库中添加屏幕截图到README?
是否可以在GitHub存储库中的README文件中放置屏幕截图? 语法是什么?
如果您使用Markdown(README.md):
假设您在回购中有图片,您可以使用相对URL:

如果您需要嵌入其他地方托管的图片,则可以使用完整的网址

GitHub建议您使用相对链接和?raw=true
参数来确保分叉的回收点正确。
查看一个示例:https://raw.github.com/altercation/solarized/master/README.md
此外,有关README文件中相关链接的文档:https://help.github.com/articles/relative-links-in-readmes
当然还有markdown文档:http://daringfireball.net/projects/markdown/syntax
此外,如果您创建了新的分支screenshots
来存储图像,则可以避免它们位于master
工作树中
然后你可以使用以下内容嵌入它们:

即使已经有一个可接受的答案,我想添加另一种方式将图像上传到GitHub上自述。
更多细节你可以在这里找到
我发现我的回购中图像的路径raw.github.com
,我不得不链接到raw.github.com
子域的图像。
网址格式https://raw.github.com/{USERNAME}/{REPOSITORY}/{BRANCH}/{PATH}
Markdown示例
上一篇: How to add screenshot to READMEs in github repository?
下一篇: What is the difference between origin and upstream on GitHub?