create_quiz <- function(file, output){
quiz = file %|% to_exercises %|% knit_exercises %|% parse_exercises
layouts = get_layouts(system.file('bootstrap', 'layouts', package = 'RGoogleForms'))
if (missing(output)) {
output = gsub('.Rmd', '.html', file)
}
cat(render_quiz(quiz, layouts), file = output)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.