Embedding {learnr} in {distill}

{learnr} is an R package from RStudio which uses R Markdown to create interactive tutorials. Once completed, the tutorial can be published via shiny server or RStudio Connect. As a {learnr} markdown file contains its own yaml header it cannot be directly included in a website built by distill. It can, however, be included if it is hosted (shiny server or RStudio Connect) and embedded using iframe

1```{r, layout="l-screen-inset"}
2htmltools::tags$iframe(src = "<RSCONNECT URL>", height = "600px", width = "100%", `data-external` = "1")
3```

where is the url of the {learnr} tutorial. The use of data-external is related to the way that pandoc processes iframe tags (see https://community.rstudio.com/t/insert-raw-html-iframe-into-rmarkdown/94334 and https://pandoc.org/MANUAL.html#option--self-contained).