You can refer a markdown file to another markdown file on GitHub using a relative link.
Suppose your GitHub repository stricture is like below:
1 2 3 4 5 6 7 8 |
project/ text.md subpro/ subtext.md subsubpro/ subsubtext.md subsubpro2/ subsubtext2.md |
The relative link to subtext.md
in text.md
might look like this:
1 2 |
[this subtext](subpro/subtext.md) |
The relative link to subsubtext.md
in text.md
might look like this:
1 2 |
[this subsubtext](subpro/subsubpro/subsubtext.md) |
The relative link to subtext.md
in subsubtext.md
might look like this:
1 2 |
[this subtext](../subtext.md) |
The relative link to subsubtext2.md
in subsubtext.md
might look like this:
1 2 |
[this subsubtext2](../subsubpro2/subsubtext2.md) |
The relative link to text.md
in subsubtext.md
might look like this:
1 |
[this text](../../text.md) |
If you want to refer to an external file (not present in your repository), you can use an absolute like (anchor tag) like this:
1 |
[this external](https://github.com/user/repo/blob/branch/external.md) |