git - VSTS Markdown 文档中图像的正确地址是什么?

标签 git markdown azure-devops visual-studio-code

我在 Visual Studio Team Services 中托管的 git 存储库的根目录中有一个 README.md 文件。

当我通过项目门户导航到 Web 浏览器中的文件时,我可以看到正确呈现的 Markdown ,但图像除外。我想在 README 文件中添加一些屏幕截图,并想知道引用存储在 root of the repository/doc/images/image01.png 文件夹中的图像的正确方法

由于 README 文件也存储在存储库的根目录下,我认为它只是一个相对链接。在我的计算机 (OSX) 上使用 Visual Studio Code 时,我可以使用相对路径,并且图像可以使用图像标记正确呈现:

![Alt text](doc/images/readmeFileComparison.png?raw=true "Readme file side by side comparison")

在使用浏览器(示例 url)查看 README 文件时,图像标签是否必须不同才能让我查看图像:

https://myaccount.visualstudio.com/ProjectName/_git/repositoryName?path=%2FREADME.md&version=GBmaster&_a=contents

guidance from Microsoft但一定有我想念的东西。呈现 Markdown 时,我得到了一个丢失的图像标签。如果我在新选项卡中打开图像,我会收到 HTTP 500 错误和以下消息:

More information about this error

The item doc/images/pullNewChangesFromMaster.png?raw=true does not exist at the specified version, or you do not have permission to access it.

即使地址中有或缺少前导正斜杠,我也会遇到同样的错误。

 ![Alt text](doc/images/pullNewChangesFromMaster.png?raw=true "About to Pull down the new changes")

 ![Alt text](/doc/images/pullNewChangesFromMaster.png?raw=true "About to Pull down the new changes")

最佳答案

阅读Guidance page from Microsoft ,我没有看到任何地方提到 ?raw=true

所以最好不用它试试你的相对链接。

![Alt text](doc/images/pullNewChangesFromMaster.png "About to Pull down the new changes")

关于git - VSTS Markdown 文档中图像的正确地址是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42036509/

相关文章:

java - Markwon 不处理链接

tfs - 如何从 Azure DevOps Server 调用用户图形 API

azure - 我可以使用 azure cli 触发发布管道吗

ruby-on-rails - 捆绑安装未从我的更新后 Hook 运行

git 添加正则表达式示例

git - 如何 git rm 位于远程但不在本地的文件?

r - 我无法生成\标签{图 :mwe-plot} with knitr

Git 分支与 Git fork

formatting - 如何在我的博客文章中使用 stackoverflow 样式标记?

azure - 为什么 azure 工件包含所有引用第三个包