Github wiki由单独的git存储库支持,然后是主项目存储库。
Github团队的This post听起来像是你应该能够链接到维基存储库中存储在维基标记中的图像。
图像和文件夹
您现在可以引用托管在Git存储库中的图像。
我已经签出了我的wiki的存储库,并将一个资源文件夹和一张图片推送到其中。我的问题是,我该如何使用这个镜像
这是可能的吗?还是我误解了什么?
发布于 2012-05-02 21:34:23
发布于 2012-09-17 12:49:49
对于希望在github维基上查看图片的观众,我找到了以下方法:
git克隆git@github.com:USER/REPO.wiki.git
”,并将您想要的任何图像放入目录github
![Alt attribute text Here](images/YOURIMAGE.ext)
[![Alt attribute text Here](images/YOURIMAGE.ext)](http://Yoursite.com)
您还可以在本地副本中添加子目录,以帮助组织wiki,因为"pages“选项卡只是将它们列出。但是请记住,即使在推送新目录时,"pages“选项卡也不会列出该目录。
发布于 2012-07-19 03:47:27
在readme.md
中添加图像时,所有答案似乎都不起作用。不过,我有一个解决方案:
如果图像的URL为:
https://github.com/Username/Repository-Name/blob/master/Directory-Inside-Repository/image.png
用raw
替换blob
会得到原始图像的URL:
https://github.com/Username/Repository-Name/raw/master/Directory-Inside-Repository/image.png
现在,您可以使用普通的markdown来嵌入图像:
![Image Alt](https://github.com/Username/Repository-Name/raw/master/Directory-Inside-Repository/image.png)
更新:到目前为止,GitHub还提供来自不同子域raw.github.com
的原始图像。因此,您还可以使用:
https://raw.github.com/Username/Repository-Name/master/Directory-Inside-Repository/image.png
示例: https://raw.github.com/Automattic/liveblog/master/screenshot-1.png
https://stackoverflow.com/questions/10045517
复制相似问题