#!/usr/bin/env Rscript
pkgdown::build_site()
envir::import_from(magrittr, `%<>%`)
# fix "Source: vignettes/foo.Rmd" link to point to "Source: vignettes-src/foo.Rmd"
# in head of website articles
for (file in Sys.glob(c("docs/articles/*.html",
"docs/articles/examples/*.html"))) {
lines <- readLines(file)
i <- grep("Source: ", lines, fixed = TRUE)
lines[i] %<>% gsub("vignettes/", "vignettes-src/", ., fixed = TRUE)
writeLines(lines, file, useBytes = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.