Build CRAN html redirect vignettes that are placed in inst/doc/ that redirect to the gh-pages branch of the github url provided in the DESCRIPTION file. This function is heavily inspired by devtools::build_vignettes()
.
build_vignettes(pkg = ".", dependencies = "VignetteBuilder",
output_dir = file.path(as.package(pkg)$path, "_gh-pages"),
extra_dirs = file.path(as.package(pkg)$path, "vignettes",
c(lazy_widgets_dir(), assets_dir())),
delete_files = file.path(as.package(pkg)$path, "vignettes",
c(".build.timestamp")), include_vignette_source = FALSE)
path to package. Provided directly to devtools::as.package()
supplied directly to devtools::install_deps()
directory where the fully contained vignette directory should be exported
list of directories that will be copied to the gh-pages that are not vignettes and should not be shipped with the package. Files that should be exist in both gh-pages and the package should be contained in the vignettes/.install_extras
file.
list of files that should be deleted if they still exist when the function ends
boolean to determine if the vignettes should be copied to the destination directory. Default behavior is to NOT copy the original vignettes