quarto

Controlling HTML output location in Quarto


In RMarkdown, I used to control the output HTML file's location like this:

This was my RMarkdown YAML:

---
title: 'Hello'
knit: (function(input, ...) { 
  rmarkdown::render(input, output_file = '../Outputs/report.html') 
})
output:
  html_document
---

How can I achieve something similar in Quarto to specify where the generated HTML report should be saved?


Solution

  • You can use the output-dir argument of the quarto-cli.

    In a terminal/shell:

    quarto render scripts/hello.qmd --output-dir report/
    

    Also, see this discussion on this topic on github.