GitHub relative link in Markdown file

前端 未结 11 1556
孤独总比滥情好
孤独总比滥情好 2020-11-29 14:40
11条回答
  •  一生所求
    2020-11-29 15:07

    Just wanted to add this because none of the above solutions worked if target link is directory with spaces in it's name. If target link is a directory and it has space then even escaping space with \ doesn't render the link on Github. Only solution worked for me is using %20 for each space.

    e.g.: if directory structure is this

    Top_dir
    |-----README.md
    |-----Cur_dir1
          |----Dir A
               |----README.md
          |----Dir B
               |----README.md
    

    To make link to Dir A in README.md present in Top_dir you can do this:

    [Dir 1](Cur_dir1/Dir%20A)
    

提交回复
热议问题