Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduced a output_dir parameter, which sets the --ouput-dir flag #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#' `"all"` will render all formats defined within the file or project.
#' @param output_file The name of the output file. If using `NULL` then the
#' output filename will be based on filename for the input file.
#' @param output_dir The output directory, this is necessary to set in order
#' to fix a rendering issue with .html files, where formating and
#' images were missing. Additionally a subdirectory of the yaml output directory can be detailed.
#' @param execute Whether to execute embedded code chunks.
#' @param execute_params A list of named parameters that override custom params
#' specified within the YAML front-matter.
Expand Down Expand Up @@ -54,6 +57,7 @@
quarto_render <- function(input = NULL,
output_format = NULL,
output_file = NULL,
output_dir = NULL,
execute = TRUE,
execute_params = NULL,
execute_dir = NULL,
Expand Down Expand Up @@ -108,6 +112,9 @@ quarto_render <- function(input = NULL,
if (!missing(output_file)) {
args <- c(args, "--output", output_file)
}
if (!missing(output_dir)) {
args <- c(args, "--output-dir", output_dir)
}
if (!missing(execute)) {
args <- c(args, ifelse(isTRUE(execute), "--execute", "--no-execute"))
}
Expand Down