Open dmphillippo opened 2 years ago
Yes it works correctly from the direct url (that is also linked at the top of the dashboard): https://dmphillippo.r-universe.dev/articles/multinma/example_atrial_fibrillation.html
The problem is that we inject iframeresizer code into the vignette html when we generate the articles, however your asis html files don't have this right now. Also the markup is ugly of course.
How is it possible that pkgdown is able to generate a pretty custom formatted article from your as-is html file?
Ah that makes sense, thanks!
Well, I actually have pkgdown set up to rebuild the vignettes from the Rmds rather than using the asis html. I'm not sure the latter would be possible, and probably not pretty! The pre-compilation is only really needed to keep build time down on CRAN.
Is it possible for r-universe to inject the script to the asis html after the fact?
If the purpose is to keep the build-time down, it may be easier to only precompute the Rmd -> md part (i.e. run the R code), instead of shipping the full html with a separate vignette engine?
This is the method that I also use for my own vignettes, described also here: https://ropensci.org/blog/2019/12/08/precompute-vignettes/
Thanks Jeroen. I did look at the Rmd to md option at the time, but I can't remember now why I went down the html asis route instead. I agree that your way does make more sense!
In my package I have a number of vignettes that are pre-rendered due to longer run times; the rendered html files are then included using
R.rsp::asis
.These all show up correctly in my universe, however the page cannot be scrolled - see this article for example, in comparison to the same vignette on the pkgdown site.
It seems to be something to do with the height of the iframe that contains the rendered article, but what or why is beyond me!