golem
golem copied to clipboard
Allow to use a bundle zip for html template
some html templates are bundled as a zip so it might be interesting to be able to get them
Note sure about what the expected behaviour is.
Do you mean adding a helper like so:
unzip_html_bundle <- function(from, to) {
unzip(zipfile = from, exdir = to)
# possible removing old .zip via
unlink(from, recursive = TRUE)
return(invisible(pth))
}
Then adding this to use_external_html_template ()
, use_internal_html_template ()
and add_html_template()
with a flag e.g. use_html_bundle=TRUE/FALSE
.
Re-using this helper then with other argument values passed down from these three versions?
Also there can be like some dozen templates inside inst/app/www
so not sure if that's what is intended when downloading a whole bundled zip; one could prompt the user for a specific template to keep, removing the rest, but that could also be out of scope for this feature.
Happy to get on this, though, there is #1022 . If, by any chance #1022 is still relevant I'd happy to PR here after #1022 is merged (or closed).