Skip to content

Correct way to link to root? #23674

Answered by otter-computer
tomcam asked this question in General
Discussion options

You must be logged in to vote

There isn’t really a “correct” way to link back to the root, but usually the more explicit the better. Both of these examples should work though:

[Back](/)
[Back](/README.md)

Be aware that the first link won’t work when viewing the rendered file on GitHub.com in some instances, just down to the way GitHub constructs repository URLs compared to your Pages site. The second link should work for both though.

The following should work, assuming the file that contains these links is inside a single directory:

[Back](../)
[Back](../README.md)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants