CenterForOpenScience / osf.io

Facilitating Open Science
https://osf.io
Apache License 2.0
677 stars 331 forks source link

Render html files from R Notebooks and R Markdown #9585

Open isaactpetersen opened 3 years ago

isaactpetersen commented 3 years ago

It would be great if the OSF viewer could render html files generated from R Notebooks and R Markdown. This would help more easily disseminate computational notebooks, for better reproducibility, so that users don't need to download the files to view them. I'm attaching an example of an html file from an R Notebook. Thanks for your help building the OSF! Example Computational Notebook.nb.html.zip

mdingemanse commented 2 years ago

I have this question too. And more specifically: OSF says it doesn't render (txt) files bigger than 200Kb; many Rmarkdown .html reports are bigger than this because they include inlined images in base64. So that size limit would have to be lifted otherwise it still won't work for most use cases.

But my testing shows that even a pared down .html file that is smaller than 200kb doesn't render; instead, the source is shown. What is holding OSF back from rendering .html?

rempsyc commented 1 year ago

I would really like to see this feature implemented. I develop my analysis scripts as rmarkdown reports that also include the raw code. That is much easier to work with for clarity, etc. But then I would like to just be able to share that rmarkdown file, instead of having to convert the rmarkdown to code, add back all the comments that were text and format properly again, which creates a lot of extra work for every such file. I'm afraid people will not feel safe if they have to download an html file instead of just viewing it in the browser (most people are not familiar with html files per se).

Linked to #7482 and CenterForOpenScience/modular-file-renderer#354