I am trying to render a .qmd
file to HTML specifying an output file. I am compiling it from a Quarto Project from RStudio on MacOS 12.6. I also have a bootstrap theme in the YAML header.
---
title: "quarto_output_experiment"
format:
html:
theme: journal
---
If I render it with Cmd + Shift + K
from RStudio, the HTML document appears in the same directory as the .qmd
and looks fine. However if I render it from the Quarto CLI specifying the output directory (a folder called output
), the HTML can't render plots and lacks any sort of formatting and style. The command is
quarto render quarto_output_experiment.qmd --output output/report.html
Here are the results.
What am I missing? How can I render the HTML in a different directory and have plots and proper style?
For reference, this is the document itself
---
title: "quarto_output_experiment"
format:
html:
theme: journal
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document.
To learn more about Quarto see <https://quarto.org>.
```{r}
1 + 1
```
# Lorem ipsum
```{r}
library(ggplot2)
ggplot(data.frame(x = rnorm(100)), aes(x)) + geom_density()
```
UPDATE
Specifying --output-dir
intead of --output
produces a document with plots and style, but the question still remains if there is a way to change the name of the output HTML file? Probably not mission critical, but I'm still curious.