Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (identical(pkg$development$mode, "devel")) {
if (identical(pkg$development$mode, "devel") && identical(pkg$meta$development$mode, "auto")) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean ||?

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)
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

Expand Down