Skip to content

Commit 0884290

Browse files
committed
Add quarto_args to quarto_render()
closes #125
1 parent 003dfb6 commit 0884290

File tree

14 files changed

+60
-11
lines changed

14 files changed

+60
-11
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: quarto
22
Title: R Interface to 'Quarto' Markdown Publishing System
3-
Version: 1.3.6
3+
Version: 1.3.7
44
Authors@R: c(
55
person("JJ", "Allaire", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-0174-9868")),

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# quarto (development version)
22

3+
- Add `quarto_args` to `quarto_render()` and other commands to pass additional arguments to `quarto` CLI commands. This is for advanced usage e.g. when new options are added to Quarto CLI that would not be user-facing in this package's functions (thanks, @gadenbuie, #125).
4+
35
- Add `quiet` argument to pass `--quiet` to `quarto` CLI commands
46

57
- Error message now advises to re-run with `quiet = FALSE` because `quarto_render(quiet = TRUE)` will run `quarto render` in quiet mode (thanks to @gadenbuie, #126, @wlandau, #16).

R/add.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#'
2020
#' @param no_prompt Do not prompt to confirm approval to download external extension.
2121
#'
22-
#' @param quarto_args Character vector of other `quarto` CLI flag pass to the command.
23-
#'
2422
#' @examples
2523
#' \dontrun{
2624
#' # Install a template and set up a draft document from a GitHub repository

R/inspect.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' and dependent resources.
66
#'
77
#' @inheritParams quarto_render
8-
#' @inheritParams quarto_add_extension
8+
#'
99
#' @param input The input file or project directory to inspect.
1010
#'
1111
#' @return Named list. For input files, the list contains the elements

R/render.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#' @param profile [Quarto project
4242
#' profile(s)](https://quarto.org/docs/projects/profiles.html) to use. Either
4343
#' a character vector of profile names or `NULL` to use the default profile.
44+
#' @param quarto_args Character vector of other `quarto` CLI flag pass to the
45+
#' command. This is mainly for advanced usage, e.g it can be useful for new
46+
#' options added to quarto CLI and not yet supported as function argument.
4447
#' @param pandoc_args Additional command line options to pass to pandoc.
4548
#' @param as_job Render as an RStudio background job. Default is "auto",
4649
#' which will render individual documents normally and projects as
@@ -82,6 +85,7 @@ quarto_render <- function(input = NULL,
8285
debug = FALSE,
8386
quiet = FALSE,
8487
profile = NULL,
88+
quarto_args = NULL,
8589
pandoc_args = NULL,
8690
as_job = getOption("quarto.render_as_job", "auto")) {
8791

@@ -176,6 +180,9 @@ quarto_render <- function(input = NULL,
176180
if (!is.null(profile)) {
177181
args <- cli_arg_profile(profile, args)
178182
}
183+
if (!is.null(quarto_args)) {
184+
args <- c(args, quarto_args)
185+
}
179186
if (!is.null(pandoc_args)) {
180187
args <- c(args, pandoc_args)
181188
}

R/use.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#'
33
#' Install and use a template for Quarto using `quarto use`.
44
#'
5+
#' @inheritParams quarto_render
56
#' @inheritParams quarto_add_extension
67
#'
78
#' @param template The template to install, either an archive or a GitHub

man/quarto_add_extension.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/quarto_inspect.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/quarto_render.Rd

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

man/quarto_use_template.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)