I'm using Github-pages with no Jekyll, just bare markdown .md
files.
To link from that .md
to some folder inside my repo I'm using relative links.
Why relative links? I was using absolute links like https://github.com/USER_NAME/REPO_NAME/blob/master/FOLDER_NAME but then I changed my repo name and every link stopped to work.
This is why I moved to relative links but then when I checked how the page works under custom domain -> every link stopped to work.
By "stopped" to work I mean: now when I go to www.CUSTOM_DOMAIN.com/REPO_NAME/FOLDER_NAME I'm getting 404.
EDIT 1:
When I was trying to edit this question for this comment I realized the problem is different:
- links to files works fine
- but links to folders doesn't work, i.e. REPO_NAME is not added to URI, there should be:
www.CUSTOM_DOMAIN.com/REPO_NAME/FOLDER_NAME
while actually there is:
www.CUSTOM_DOMAIN.com/FOLDER_NAME.
So my repo looks like this:
REPO_NAME/
├── README.md
├── FOLDER_NAME/
│ ├── FOLDERFILE.md
So the link in my README.md
is (NOK):
[some string for folder](/FOLDER_NAME)
(which is unwrapped by github-pages-engine to)
www.CUSTOM_DOMAIN.com/FOLDER_NAME
It works fine when I link to a file, like this (OK):
[some string for file](/FOLDER_NAME/FOLDERFILE.md)
(which is unwrapped by github-pages-engine to)
www.CUSTOM_DOMAIN.com/REPO_NAME/FOLDER_NAME.html
EDIT 2:
the page I'm trying to fix is NOT the organization/user page so it should have REPO_NAME in the path.
EDIT 3:
I changed links to remove leading slash and they still does not work. Now link in my README.md
is (NOK):
[some string for folder](FOLDER_NAME/)
(which is unwrapped by github-pages-engine to)
www.CUSTOM_DOMAIN.com/REPO_NAME/FOLDER_NAME
or (also NOK):
[some string for folder](./FOLDER_NAME/)
(which is unwrapped by github-pages-engine to)
www.CUSTOM_DOMAIN.com/REPO_NAME/FOLDER_NAME