Skip to content

Instantly share code, notes, and snippets.

Last active September 20, 2021 18:48
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
#' 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)
path_glue <- glue::glue("{path}{fs::path_file(files_resources)}")
fs::file_copy(files_resources, path_glue)
Copy link

Dica do @jtrecenti para experimentar : pagedown:::list_css()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment