Question: How do I place HTML files in place within an R Distill Markdown file?
Background:
I would like to embed / incorporate an external html file within a Distill Rmd file. I don't want to show the link to the html in the document, but the content of the html file. Something like include_graphics
only for html.
I wasn't able to find something via google search. I only found Include HTML files in R Markdown file? where OP writes, he never figured out how to do it :(
From that post I tried htmltools::includeHTML("file.html")
which didn't work,
and also shiny::includeHTML("file.html")
which didn't work,
and even (it didn't work):
includes:
in_header: file.html
With htmltools::includeHTML
I at least got the error message Error loading script: https://cdn.jsdelivr.net/npm//vega@5?noext which I couldn't make sense of :(
Though I can't reproduce this error-message now (a couple of weeks later). Maybe it is because I included library(htmltools)
. Though there still is no html embedded :(
However the Distill package apparently is able to do embed html, as the _footer.html is included correctly, but automatically (such that i wasn't able to find the command in the code).
Thanks a lot!