Skip to content
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

Image & Git Root Relative Path #91

Open
sbertrand-witekio opened this issue Sep 12, 2018 · 3 comments
Open

Image & Git Root Relative Path #91

sbertrand-witekio opened this issue Sep 12, 2018 · 3 comments

Comments

@sbertrand-witekio
Copy link

Hi,

I just added picture to my GitHub wiki page and found the following :

  • The image path is relative to the root of the git not to the page itself
    • My wiki page is in a folder and having the image in the same folder does not work

Using the GTM viewer, I now have an issue where my html pages are generated in the page folder ( not the root of the git ) which does not allow for git root relative image path to be found.

Would there be a way to have an option to have all html page generated in a designated directory ( like temp but one I can select ). I could then select my git root and relative image would work.

Thanks

@sbertrand-witekio
Copy link
Author

This seems to be very specific to GitHub wiki handling since it does not handle folders : https://github.com/sbertrand-witekio/relative-image-url/wiki/Image-Readme

@satyagraha
Copy link
Owner

To investigate this, could you provide a link to a GitHub repo which:

  • has this kind of directory structure
  • renders properly when viewed on GitHub
  • does not render properly with GFM Viewer

For example, your repo, or a temporary one, or someone else's: then we can look into it. It's possible a solution would involve fixing up the IMG elements' paths, we do something similar at

private String filterLinksAndAnchors(String responseText) {
.

@sbertrand-witekio
Copy link
Author

Hi,
The example is as follow :
Image on the root readme page is relative to the root, img/Kiku.jpg :
https://github.com/sbertrand-witekio/relative-image-url/wiki/README
Image on the readme page in the image folder :
https://github.com/sbertrand-witekio/relative-image-url/wiki/Image-Readme

If all the web page of GFM Viewer were generated in the root directory ( as an option ) of the git wiki, then this behavior would match GitHub Wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants