check_template <- function(template) {
## Check that the template is valid
valid_templates <- c('index.Rmd', 'publications.Rmd', 'presentations.Rmd', 'contact.Rmd', '_config.yml', '_site.yml', 'avatar.jpg', 'sample_presentation.pdf')
if(!template %in% valid_templates) {
stop("`template` is not among the valid options. Valid options are:\n",
paste(valid_templates, collapse = ", "), call. = FALSE)
}
template
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.