https://github.com/cran/pkgdown
Revision 651be9df176377fc2008a1e0990db54e7e2f0daf authored by Hadley Wickham on 14 September 2019, 23:10:08 UTC, committed by cran-robot on 14 September 2019, 23:10:08 UTC
1 parent 6522ead
Tip revision: 651be9df176377fc2008a1e0990db54e7e2f0daf authored by Hadley Wickham on 14 September 2019, 23:10:08 UTC
version 1.4.1
version 1.4.1
Tip revision: 651be9d
build-logo.R
build_logo <- function(pkg = ".") {
pkg <- as_pkgdown(pkg)
logo_path <- find_logo(pkg$src_path)
if (!is.null(logo_path)) {
file_copy_to(pkg, logo_path, from_dir = path_dir(logo_path))
}
}
find_logo <- function(path) {
logo_path <- path(path, "logo.svg")
if (file_exists(logo_path))
return(logo_path)
logo_path <- path(path, "man", "figures", "logo.svg")
if (file_exists(logo_path))
return(logo_path)
logo_path <- path(path, "logo.png")
if (file_exists(logo_path))
return(logo_path)
logo_path <- path(path, "man", "figures", "logo.png")
if (file_exists(logo_path))
return(logo_path)
NULL
}
Computing file changes ...