Relative link in readme broken if readme viewed automatically by repo

瘦欲@ 提交于 2019-12-10 02:48:55

问题


I have a repo as part of a organization on github. For instance:

MYORGANIZATION/MyRepository

The repo contains a README.md file.

Within this README.md file I have a link so another .md file which is located in the same repo ind the same folder as README.md:

/README.md /anotherMarkdown.md

The README.md contains a relative link (as described here: https://help.github.com/articles/relative-links-in-readmes/) to anotherMarkdown.md:

[This is my relative link](anotherMarkdown.md)

If I open the readme with this URL, the relative link works:

https://github.com/MYORGANIZATION/MyRepository/blob/master/README.md

The links directs to:

https://github.com/MYORGANIZATION/MyRepository/blob/master/anotherMarkdown.md

If I open the Repository-URL https://github.com/MYORGANIZATION/MyRepository/ the root-directory of reposiutory is shown, as well as the readme below the file-list.

BUT the above described relative link is now broken (gives 404) and directs to:

https://github.com/MYORGANIZATION/MyRepository/anotherMarkdown.md

Is this an expected behavior? What is wrong with my link?


回答1:


Seems to be fixed by github. Works again on my side.



来源:https://stackoverflow.com/questions/39445387/relative-link-in-readme-broken-if-readme-viewed-automatically-by-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!