satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
95 stars 27 forks source link

Image & Git Root Relative Path #91

Open sbertrand-witekio opened 6 years ago

sbertrand-witekio commented 6 years ago

Hi,

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

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 commented 6 years ago

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 commented 6 years ago

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

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 https://github.com/satyagraha/gfm_viewer/blob/2948c8cc8413ff63bee30adc34f07eaff3e1ee3d/plugin/source/code/satyagraha/gfm/support/impl/TransformerDefault.java#L129 .

sbertrand-witekio commented 6 years ago

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