contains_rmarkdown <- function(filepath) {
libs_file_lines <-
readr::read_lines(filepath)
any(grepl("^library\\(rmarkdown\\)", libs_file_lines))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.