Last active
September 20, 2021 18:48
-
-
Save beatrizmilz/d6969667833a88987d017b93d059ca7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Copy templates from packages | |
#' | |
#' @param path Character: a path where the files will be copied | |
#' @param pacote name of the package that contains the template | |
#' @param template name of the template: thesis, resume, poster-relaxed, | |
#' poster-jacobs, card ... | |
#' @return | |
#' @export | |
#' | |
#' @examples get_templates_packages("template/", "pagedreport", "windmill") | |
get_templates_packages <- function(path, pacote = "pagedown", template = "thesis") { | |
path_resources <- system.file("resources", package = pacote) | |
files_resources <- | |
fs::dir_ls(path_resources, recurse = TRUE, regexp = template) | |
fs::dir_create(path) | |
path_glue <- glue::glue("{path}{fs::path_file(files_resources)}") | |
fs::file_copy(files_resources, path_glue) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dica do @jtrecenti para experimentar :
pagedown:::list_css()