GitHub relative link in Markdown file

前端 未结 11 1555
孤独总比滥情好
孤独总比滥情好 2020-11-29 14:40
11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 14:59

    For example, you have a repo like the following:

    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:

    [this subtext](subpro/subtext.md)
    

    The relative link to subsubtext.md in text.md might look like this:

    [this subsubtext](subpro/subsubpro/subsubtext.md)
    

    The relative link to subtext.md in subsubtext.md might look like this:

    [this subtext](../subtext.md)
    

    The relative link to subsubtext2.md in subsubtext.md might look like this:

    [this subsubtext2](../subsubpro2/subsubtext2.md)
    

    The relative link to text.md in subsubtext.md might look like this:

    [this text](../../text.md)
    

提交回复
热议问题