Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to link to a file with spaces in the filename in github README.md

Tags:

I have a repository A in github, and there is a folder B, and a file named "hello world.md" in folder B. (There is space in the filename.)

In the README.md in repository A, I want to link to "hello world.md", so I write in this way: [hello world](./B/hello world.md) or [hello world](./B/hello\ world.md) but they all cannot work. How to link the file correctly?

like image 979
greenleaf Avatar asked Nov 01 '17 07:11

greenleaf


1 Answers

Basile Starynkevitch is right, we should avoid use spaces, brackets and parenthesis in file paths both for us and others. But if there are cases that we cannot avoid spaces, we can use %20 to replace the space in the link path, then it will work.

like image 182
greenleaf Avatar answered Sep 28 '22 20:09

greenleaf