knitpandoc_epub <- function(filename) {
library(knitr)
library(markdown)
fileRmd <- paste(filename,".Rmd", sep="")
knitr::knit2html(fileRmd)
filemd <- paste(filename,".md", sep="")
fileepub <- paste(filename,".epub", sep="")
pandoccommand_odt <- paste("pandoc ","-S ",filemd," -o ",fileepub," --standalone",sep="")
system(pandoccommand_odt)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.