CenterForOpenScience / ember-osf-web

Ember front-end for the Open Science Framework
https://osf.io
Apache License 2.0
120 stars 56 forks source link

Rendering of markdown files in Viewer #2073

Open DTP587 opened 11 months ago

DTP587 commented 11 months ago

Hello, apologies if I have this wrong as this is my first time opening an issue!

I have a repository with the OSF where inside we have linked out each of the project modules to separate GitHub repositories with markdown files containing a list of instructions (example).

Unfortunately, when these files are viewed though the OSF website, it renders incorrectly with the images missing.

I understand that as these modules are not directly hosted on the OSF it may be difficult/impossible to render these markdown files correctly. Is there any possibility to get this fixed?

Thank you 😊

brianjgeiger commented 11 months ago

Hello. On first look, it seems like the problem is that your image tags are referencing relative paths for your images (ex. image.jpg). If you replace those with absolute paths (ex. https://domain.com/files/image.jpg), it should work properly.

DTP587 commented 11 months ago

Thanks 😊 I see that would fix the images; but other structures in the markdown files seem to be incorrectly displaying too:

Table Incorrect

Code Block Incorrect

Correct display on GitHub:

Table GitHub

Code Block GitHub

brianjgeiger commented 11 months ago
Thanks 😊 I see that would fix the images; but other structures in the markdown files seem to be incorrectly displaying too:

![Table Incorrect](https://github.com/CenterForOpenScience/ember-osf-web/assets/42982107/636fbd71-568a-4ecc-b0db-a9f03444196c)

![Code Block Incorrect](https://github.com/CenterForOpenScience/ember-osf-web/assets/42982107/9b97392d-9369-4e5d-8d61-8b869a85c6f9)

Correct display on GitHub:

![Table GitHub](https://github.com/CenterForOpenScience/ember-osf-web/assets/42982107/7e771a67-4b08-4db0-9763-197861976a42)

![Code Block GitHub](https://github.com/CenterForOpenScience/ember-osf-web/assets/42982107/3dff0633-0907-4a32-8f76-670d9d14b861)



--
Reply to this email directly or view it on GitHub:
https://github.com/CenterForOpenScience/ember-osf-web/issues/2073#issuecomment-1838711259
You are receiving this because you commented.

Message ID: ***@***.***>