#' @title
#' Use a hex sticker
#'
#' @description
#' Adds a script in `dev/use_hex.R` that generates a hex sticker based on
#' certain parameters defined inside the script.
#'
#' @param location location of the logo relative to the `inst` directory.
#' Defaults to `figures/logo.png`.
#' @param overwrite whether or not to overwrite the script if it already exists.
#'
#' @export
dev_use_hex <- function(location = "figures/logo.png", overwrite = FALSE,
envir = parent.frame()) {
log_info("Ensuring packages are in the package description")
usethis::use_package("hexSticker")
usethis::use_package("magrittr")
usethis::use_package("grid")
usethis::use_package("png")
log_info("Copying template")
dev_copy_template(
template = "dev-hex.R",
destination = here::here("dev", "dev-hex.R"),
overwrite = overwrite,
envir = envir
)
log_success("Template copied!")
return(invisible(TRUE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.