diff --git a/R/build-quarto-articles.R b/R/build-quarto-articles.R index 5df7ab63d..02c681c65 100644 --- a/R/build-quarto-articles.R +++ b/R/build-quarto-articles.R @@ -1,12 +1,5 @@ build_quarto_articles <- function(pkg = ".", article = NULL, quiet = TRUE) { pkg <- as_pkgdown(pkg) - if (pkg$bs_version < 5) { - cli::cli_abort(c( - "Quarto articles require Bootstrap 5.", - "i" = "See details at {.url pkgdown.r-lib.org/articles/customise.html#getting-started}"), - call = NULL - ) - } qmds <- pkg$vignettes[pkg$vignettes$type == "qmd", ] if (!is.null(article)) { @@ -15,6 +8,13 @@ build_quarto_articles <- function(pkg = ".", article = NULL, quiet = TRUE) { if (nrow(qmds) == 0) { return() } + if (pkg$bs_version < 5) { + cli::cli_abort(c( + "Quarto articles require Bootstrap 5.", + "i" = "See details at {.url pkgdown.r-lib.org/articles/customise.html#getting-started}"), + call = NULL + ) + } check_installed("quarto") if (quarto::quarto_version() < "1.5") { cli::cli_abort("Quarto articles require version 1.5 and above.", call = NULL)