Skip to contents

Runs the conversion pipeline (front matter -> Markdown AST -> chunks -> conversion -> write) on one .Rmd file, producing a .qmd file.

Usage

convert_file(
  path,
  output = NULL,
  overwrite = FALSE,
  dry_run = FALSE,
  validate = FALSE
)

Arguments

path

Path to the input .Rmd file.

output

Path to write the .qmd file. NULL derives it from path.

overwrite

Overwrite an existing output file? Default FALSE.

dry_run

Report what would be written without writing? Default FALSE.

validate

Run validate_document() on the result? Default FALSE.

Value

Invisibly, a conversion result object carrying the output path, applied rules, and warnings.

Details

Source .Rmd files are never modified. The output path defaults to the input path with its extension changed to .qmd; existing output is not clobbered unless overwrite = TRUE.