You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a Pages site with Markdown files on GitLab using their Pages feature.
My project site exists within a Project Group (with other relevant projects)
Within my Repo, When I define a relative path that links an image (or another Markdown file), the path should be: (/[assets folder]/[images folder]/image-file.png).That same path/link on my deployed Gitlab pages site should be: gitlab.[My Company].io/My Repo Group/My Repo/assets folder/image folder/image-file.png
Instead this is what's happening:
Instead, Gitlab is taking my file path — (/[assets folder]/[images folder]/image-file.png) — and calling this URL: gitlab.[My Company].io/assets folder/image folder/image-file.png...
GitLab is skipping my Project Group and Repo in the pathway and missing the file, which throws me a 404 (and doesn't embed the image).
I'm at a loss here. Any suggesting to help GitLab call the correct file path? Hoping I'm making a simple mistake.
I have tried many variation of pathways to embed images (and link other files). I have this problem when linking Markdown files as well. The path skips my Project Group and Project.
Docs Folder Example (Linking/reference other markdown files within a markdown file)
Within my repo — The path that should work is: (/[docs folder]/[docs subfolder]/file.md).
What my deployed site links to based on that path: gitlab.[My Company].io/[docs folder]/[docs subfolder]/file.md
It skips my repo group and repo.
The relative path that works, but NOT FOR images is: (../[docs subfolder]/file.md)
PagesHost a static website, right from your repoQuestion
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Question
Body
I have created a Pages site with Markdown files on GitLab using their Pages feature.
My project site exists within a Project Group (with other relevant projects)
Within my Repo, When I define a relative path that links an image (or another Markdown file), the path should be:
(/[assets folder]/[images folder]/image-file.png)
.That same path/link on my deployed Gitlab pages site should be:gitlab.[My Company].io/My Repo Group/My Repo/assets folder/image folder/image-file.png
Instead this is what's happening:
Instead, Gitlab is taking my file path —
(/[assets folder]/[images folder]/image-file.png)
— and calling this URL:gitlab.[My Company].io/assets folder/image folder/image-file.png
...GitLab is skipping my Project Group and Repo in the pathway and missing the file, which throws me a 404 (and doesn't embed the image).
I'm at a loss here. Any suggesting to help GitLab call the correct file path? Hoping I'm making a simple mistake.
_config.yml info:
url:
http://gitlab.[My Company].io/My Repo Group/My Repo
baseurl:
/My Repo Group/My Repo
I have tried many variation of pathways to embed images (and link other files). I have this problem when linking Markdown files as well. The path skips my Project Group and Project.
Docs Folder Example (Linking/reference other markdown files within a markdown file)
Within my repo — The path that should work is:
(/[docs folder]/[docs subfolder]/file.md)
.What my deployed site links to based on that path:
gitlab.[My Company].io/[docs folder]/[docs subfolder]/file.md
It skips my repo group and repo.
The relative path that works, but NOT FOR images is:
(../[docs subfolder]/file.md)
Beta Was this translation helpful? Give feedback.
All reactions