Skip to content

Commit

Permalink
Assert pkgdown site has proper fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 3, 2025
1 parent 40ce216 commit 5a6ff2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/buildtools.R
Original file line number Diff line number Diff line change
Expand Up @@ -1042,5 +1042,10 @@ normalize_description <- function(path){
}

find_pkgdown_url <- function(package){
tryCatch(dirname(as.character(downlit:::remote_metadata(package)$urls$reference)), error = function(...){})
tryCatch({
yaml <- downlit:::remote_metadata(package)
if(length(yaml$pkgdown) && length(yaml$pandoc)){
dirname(as.character(yaml$urls$reference))
}
}, error = function(...){})
}

0 comments on commit 5a6ff2d

Please sign in to comment.