Skip to content

Commit

Permalink
Add param profile to quarto_render()
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b committed Oct 4, 2023
1 parent daa5f05 commit e640dea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 1 addition & 3 deletions R/inspect.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#' config and engines. Inspecting an input path return its formats, engine,
#' and dependent resources.
#'
#' @inheritParams quarto_render
#' @param input The input file or project directory to inspect.
#' @param profile [Quarto project
#' profile](https://quarto.org/docs/projects/profiles.html) to use. If
#' `NULL`, the default profile is used.
#'
#' @return Named list. For input files, the list contains the elements
#' `quarto`, `engines`, `formats`, `resources`, plus `project` if the file is
Expand Down
7 changes: 7 additions & 0 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#' @param cache_refresh Force refresh of execution cache.
#' @param debug Leave intermediate files in place after render.
#' @param quiet Suppress warning and other messages.
#' @param profile [Quarto project
#' profile](https://quarto.org/docs/projects/profiles.html) to use. If
#' `NULL`, the default profile is used.
#' @param pandoc_args Additional command line options to pass to pandoc.
#' @param as_job Render as an RStudio background job. Default is "auto",
#' which will render individual documents normally and projects as
Expand Down Expand Up @@ -65,6 +68,7 @@ quarto_render <- function(input = NULL,
cache_refresh = FALSE,
debug = FALSE,
quiet = FALSE,
profile = NULL,
pandoc_args = NULL,
as_job = getOption("quarto.render_as_job", "auto")) {

Expand Down Expand Up @@ -142,6 +146,9 @@ quarto_render <- function(input = NULL,
if (isTRUE(quiet)) {
args <- c(args, "--quiet")
}
if (!is.null(profile)) {
args <- c(args, "--profile", profile)
}
if (!is.null(pandoc_args)) {
args <- c(args, pandoc_args)
}
Expand Down
4 changes: 4 additions & 0 deletions man/quarto_render.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e640dea

Please sign in to comment.