是否可以在一个GitHub存储库的README文件中放置一个截图?语法是什么?
当前回答
从2021年3月起,现在支持:
将文件附加到标记文件
You can now attach files, including images, to markdown files while you're editing them in the web. This works just like file attachments in issues and pull requests and supports the same file types. Just drag and drag, click and select, or paste. Note: If you add an image to a markdown file, anyone can view the anonymized image URL without authentication, even if the markdown file is in a private repository. To keep images private, serve them from a private network or server that requires authentication. For more information on anonymized URLs see "About anonymized image URLs".
其他回答
比添加URL简单多了 只要上传一张图片到同一个存储库, 如:
(截图)! (screenshot.png)
从2021年3月起,现在支持:
将文件附加到标记文件
You can now attach files, including images, to markdown files while you're editing them in the web. This works just like file attachments in issues and pull requests and supports the same file types. Just drag and drag, click and select, or paste. Note: If you add an image to a markdown file, anyone can view the anonymized image URL without authentication, even if the markdown file is in a private repository. To keep images private, serve them from a private network or server that requires authentication. For more information on anonymized URLs see "About anonymized image URLs".
点击右上角的绿色按钮创建一个新问题。截取你需要的任何内容的截图,并将其粘贴到问题消息中(Mac上的CMD+V或Windows上的CTR+V)。
我的图像在名称中有空格,例如,粘贴图像20221006123035.png,这导致了我的问题,我失去了一些时间来修复它。如果有人有同样的问题,那么下面是步骤
我通过上传选项上传了图像 然后在网站的文件浏览UI中点击图片。 图像在浏览器中打开。从浏览器的URL复制图像的URL。您可以复制整个路径,或相对于您的.md文件 现在像这样插入。md文件的链接
使用位于/screen-shots目录中的图像。外部的<div>允许图像被定位。填充是使用<img width="desired-padding" height="0">实现的。
<div align="center">
<img width="45%" src="screen-shots/about.PNG" alt="About screen" title="About screen"</img>
<img height="0" width="8px">
<img width="45%" src="screen-shots/list.PNG" alt="List screen" title="List screen"></img>
</div>
推荐文章
- 了解Git和GitHub的基础知识
- 在GitHub上有一个公共回购的私人分支?
- 只用GitHub动作在特定分支上运行作业
- Git合并与强制覆盖
- 是否有一个链接到GitHub下载文件的最新版本的存储库?
- GitHub -致命:无法读取用户名https://github.com':没有这样的文件或目录
- Github:我能看到回购的下载数量吗?
- 如何运行一个github-actions步骤,即使前一步失败,同时仍然失败的工作
- 当我试图推到原点时,为什么Git告诉我“没有这样的远程‘原点’”?
- 在GitHub repo上显示Jenkins构建的当前状态
- 如何取消在github上的拉请求?
- HEAD和master的区别
- 在另一个目录中运行操作
- GitHub克隆与OAuth访问令牌
- 我可以在GitHub上对要点进行拉请求吗?