Skip to content

Commit 7f43e61

Browse files
Merge branch 'main' into quarto-regression-test
2 parents 5d863d8 + 62d5c5a commit 7f43e61

16 files changed

Lines changed: 133 additions & 89 deletions

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Imports:
3535
jsonlite,
3636
openssl,
3737
purrr (>= 1.0.0),
38-
ragg,
38+
ragg (>= 1.4.0),
3939
rlang (>= 1.1.4),
4040
rmarkdown (>= 2.27),
4141
tibble,
@@ -51,7 +51,7 @@ Suggests:
5151
gt,
5252
htmltools,
5353
htmlwidgets,
54-
knitr,
54+
knitr (>= 1.50),
5555
lifecycle,
5656
magick,
5757
methods,

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pkgdown (development version)
22

3+
* Option `pkgdown.internet` was removed because CDN file caching now requires an internet connection.
34
* Support for math rendering using katex and mathjax was improved and now includes necessary components using CDN (#2704).
45
* Articles (i.e., Rmarkdown/Quarto documents in `vignettes/articles`, created by `usethis::use_article()` and available on pkgdown sites but not included in a built package) have improved test cases (thanks to @venpopov and @ethanbass).
56
* ROR IDs in `DESCRIPTION` are transformed into icons, similar to ORCID IDs. (#2850)

R/build-home-authors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data_authors <- function(
3636

3737
inst_path <- path(pkg$src_path, "inst", "AUTHORS")
3838
if (file_exists(inst_path)) {
39-
inst <- read_lines(inst_path)
39+
inst <- paste(read_lines(inst_path), collapse = "\n")
4040
} else {
4141
inst <- NULL
4242
}

R/build-home-index.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ sidebar_section <- function(heading, bullets, class = make_slug(heading)) {
221221
}
222222

223223
cran_link <- function(pkg) {
224-
if (!has_internet()) {
225-
return(NULL)
226-
}
227-
228224
cran_url <- paste0("https://cloud.r-project.org/package=", pkg)
229225
req <- httr2::request(cran_url)
230226
req <- req_pkgdown_cache(req)

R/build-news.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@ has_news <- function(path = ".") {
270270
}
271271

272272
pkg_timeline <- function(package) {
273-
if (!has_internet()) {
274-
return(NULL)
275-
}
276-
277273
url <- paste0("https://crandb.r-pkg.org/", package, "/all")
278274
req <- httr2::request(url)
279275
req <- httr2::req_retry(req, max_tries = 3)

R/build.R

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -279,18 +279,6 @@
279279
#' deploy:
280280
#' install_metadata: true
281281
#' ```
282-
#'
283-
#' # Options
284-
#' Users with limited internet connectivity can disable CRAN checks by setting
285-
#' `options(pkgdown.internet = FALSE)`. This will also disable some features
286-
#' from pkgdown that requires an internet connectivity. However, if it is used
287-
#' to build docs for a package that requires internet connectivity in examples
288-
#' or vignettes, this connection is required as this option won't apply on them.
289-
#'
290-
#' Users can set a timeout for `build_site(new_process = TRUE)` with
291-
#' `options(pkgdown.timeout = Inf)`, which is useful to prevent stalled builds from
292-
#' hanging in cron jobs.
293-
#'
294282
#' @inheritParams build_articles
295283
#' @inheritParams build_reference
296284
#' @param lazy If `TRUE`, will only rebuild articles and reference pages
@@ -403,22 +391,19 @@ build_site_external <- function(
403391
new_process = FALSE,
404392
devel = devel,
405393
cli_colors = cli::num_ansi_colors(),
406-
hyperlinks = cli::ansi_has_hyperlink_support(),
407-
pkgdown_internet = has_internet()
394+
hyperlinks = cli::ansi_has_hyperlink_support()
408395
)
409396
callr::r(
410-
function(..., cli_colors, hyperlinks, pkgdown_internet) {
397+
function(..., cli_colors, hyperlinks) {
411398
options(
412399
cli.num_colors = cli_colors,
413400
cli.hyperlink = hyperlinks,
414-
cli.hyperlink_run = hyperlinks,
415-
pkgdown.internet = pkgdown_internet
401+
cli.hyperlink_run = hyperlinks
416402
)
417403
pkgdown::build_site(...)
418404
},
419405
args = args,
420-
show = TRUE,
421-
timeout = getOption('pkgdown.timeout', Inf)
406+
show = TRUE
422407
)
423408

424409
cli::cli_rule(

R/utils.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ writing_file <- function(path, show) {
8282
)
8383
}
8484

85-
has_internet <- function() {
86-
getOption("pkgdown.internet", default = TRUE)
87-
}
88-
8985
modify_list <- function(x, y) {
9086
if (is.null(x)) {
9187
return(y)

man/build_site.Rd

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/_snaps/build-article.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,6 @@
2727

2828
<span class="co">## <span style="color: #BB0000;">X</span></span>
2929

30-
# build_article yields useful error if R fails
31-
32-
Code
33-
build_article("test", pkg)
34-
Message
35-
Reading vignettes/test.Rmd
36-
Condition
37-
Error in `build_article()`:
38-
! Failed to render 'vignettes/test.Rmd'.
39-
x Quitting from test.Rmd:4-9 [unnamed-chunk-1]
40-
Caused by error:
41-
! Error!
42-
43-
---
44-
45-
Code
46-
summary(expect_error(build_article("test", pkg)))
47-
Message
48-
Reading vignettes/test.Rmd
49-
Output
50-
<error/rlang_error>
51-
Error in `build_article()`:
52-
! Failed to render 'vignettes/test.Rmd'.
53-
x Quitting from test.Rmd:4-9 [unnamed-chunk-1]
54-
Caused by error:
55-
! Error!
56-
---
57-
Backtrace:
58-
x
59-
1. \-global f()
60-
2. \-global g()
61-
3. \-global h()
62-
6330
# build_article copies image files in subdirectories
6431

6532
Code
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# build_article yields useful error if R fails
2+
3+
Code
4+
build_article("test", pkg)
5+
Message
6+
Reading vignettes/test.Rmd
7+
Condition
8+
Error in `build_article()`:
9+
! Failed to render 'vignettes/test.Rmd'.
10+
x Quitting from test.Rmd:4-10 [unnamed-chunk-1]
11+
Caused by error:
12+
! Error!
13+
14+
---
15+
16+
Code
17+
summary(expect_error(build_article("test", pkg)))
18+
Message
19+
Reading vignettes/test.Rmd
20+
Output
21+
<error/rlang_error>
22+
Error in `build_article()`:
23+
! Failed to render 'vignettes/test.Rmd'.
24+
x Quitting from test.Rmd:4-10 [unnamed-chunk-1]
25+
Caused by error:
26+
! Error!
27+
---
28+
Backtrace:
29+
x
30+
1. \-global f()
31+
2. \-global g()
32+
3. \-global h()
33+

0 commit comments

Comments
 (0)