Relative link in readme broken if readme viewed au

2019-04-20 18:08发布

问题:

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.