- build_home_index <- function(pkg = ".", quiet = TRUE) {
- pkg <- as_pkgdown(pkg)
-
- scoped_package_context(pkg$package, pkg$topic_index, pkg$article_index)
- scoped_file_context(depth = 0L)
-
- src_path <- path_first_existing(
- pkg$src_path,
- c("index.Rmd", "README.Rmd", "index.md", "README.md")
- )
- dst_path <- path(pkg$dst_path, "index.html")
- data <- data_home(pkg)
-
- if (is.null(src_path)) {
- data$index <- linkify(pkg$desc$get("Description")[[1]])
- render_page(pkg, "home", data, "index.html")
- } else {
- file_ext <- path_ext(src_path)
-