From b4fa31f9d15fa65ac6091292d0654abd610fd758 Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 21 May 2024 19:24:44 -0400 Subject: [PATCH 1/4] build_home and build_home_index were the last site parts components you couldn't call directly without init_site() --- R/build-home.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/build-home.R b/R/build-home.R index 29e885970..9c205b00b 100644 --- a/R/build-home.R +++ b/R/build-home.R @@ -293,7 +293,7 @@ build_home <- function(pkg = ".", check_bool(quiet) cli::cli_rule("Building home") - dir_create(pkg$dst_path) + create_subdir(pkg, "") build_citation_authors(pkg) From 50d3d2d084e10a2252a1ab585eea07f5a2fedd21 Mon Sep 17 00:00:00 2001 From: olivroy Date: Thu, 4 Jul 2024 08:40:52 -0400 Subject: [PATCH 2/4] Respect version_tooltip --- R/render.R | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/R/render.R b/R/render.R index f4580ea60..6fdfa28e0 100644 --- a/R/render.R +++ b/R/render.R @@ -122,7 +122,13 @@ data_template <- function(pkg = ".", depth = 0L) { # Development settings; tooltip needs to be generated at render time out$development <- pkg$development - out$development$version_tooltip <- version_tooltip(pkg$development$mode) + if (identical(pkg$development$mode, "devel")) { + out$development$version_tooltip <- pkg$meta$development$version_tooltip %||% + version_tooltip(pkg$development$mode) + } else { + out$development$version_tooltip <- version_tooltip(pkg$development$mode) + } + out$navbar <- data_navbar(pkg, depth = depth) out$footer <- data_footer(pkg) @@ -163,7 +169,7 @@ check_open_graph <- function(pkg, og, file_path = NULL, call = caller_env()) { if (is.null(og)) { return() } - + is_yaml <- is.null(file_path) base_path <- if (is_yaml) "template.opengraph" else "opengraph" @@ -220,7 +226,7 @@ check_open_graph_list <- function(pkg, } not <- obj_type_friendly(x) config_abort( - pkg, + pkg, "{.field {error_path}} must be a list, not {not}.", path = file_path, call = error_call @@ -259,7 +265,7 @@ same_contents <- function(path, contents) { cur_contents <- paste0(read_lines(path), collapse = "\n") cur_hash <- digest::digest(cur_contents, serialize = FALSE) - + identical(new_hash, cur_hash) } From 76c1b5b01e43e97253cccc8603f1e1a7290ba261 Mon Sep 17 00:00:00 2001 From: olivroy Date: Thu, 4 Jul 2024 08:41:00 -0400 Subject: [PATCH 3/4] Test with pkgdown --- pkgdown/_pkgdown.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index ce3a05f76..8b6ff92ce 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -29,6 +29,7 @@ template: development: mode: auto + version_tooltip: "dev mode" articles: - title: Customise your site From 166c0a1fc93e109031beff88a5987106af391659 Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:07:50 -0400 Subject: [PATCH 4/4] Revert test change --- pkgdown/_pkgdown.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 8b6ff92ce..ce3a05f76 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -29,7 +29,6 @@ template: development: mode: auto - version_tooltip: "dev mode" articles: - title: Customise your site