-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix image paths so they work with path prefix #540
Conversation
|
Referencing images with a URL starting with `/` will always default to the root. This however won't work if we host the page in a folder. As we use plain HTML tags in the markdown, probably the easiest fix is to use relative image links instead. This change turns all root paths for images into relative paths.
@xai Can you please take a look at this PR and let me know what you think? If you find a better solution for fixing the links and images so they work in the previews, please let me know. Thank you! |
Looks good to me, I am not aware of a better approach than relative links for the markdown pages. However, it looks like we still have several pages that use hard-coded absolute links to the theia-ide.org domain, see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, just very few broken links left.
Co-authored-by: Olaf Lessenich <olessenich@eclipsesource.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caught another two, sorry.
…ite into fix-image-paths
Thank you, I think I addressed the additional ones you found. Can you please do one more check? It clearly seems four eyes are better, even though I'm using a link checker :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! All broken links have been fixed.
Two people using two link checkers works better indeed 😂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Referencing images with a URL starting with
/
will always default to the root. This however won't work if we host the page in a folder, as we do in the preview. As we use plain HTML tags in the markdown, probably the easiest fix is to use relative image links instead. The same applies to markdown links starting with/
. They don't seem to take URL prefixes into account.This change turns all root paths into relative paths.