How do I render the same qmd multiple times, with different parameters, through _quarto.yml #7805
-
DescriptionI have one using cli I would do the following: quarto render analysis.qmd -P USA
quarto render analysis.qmd -P UK
quarto render analysis.qmd -P SA its unclear how this is done when defining the render using project:
type: website
render:
analysis.qmd
website
title: "Test"
navbar:
left:
- href: analysis.qmd
text: USA analysis
- href: analysis.qmd
text: UK analysis
- href: analysis.qmd
text: South Africa analysis
format:
html:
toc: true Feels like there should be a render section in the documentation here: https://quarto.org/docs/projects/quarto-projects.html#render-targets |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
I've come up with a solution that works for me: This is my project:
type: website
render:
- index.qmd
- US_analysis.qmd
- UK_analysis.qmd
- SA_analysis.qmd
website
title: "Test"
navbar:
left:
- href: US_analysis.qmd
text: USA analysis
- href: UK_analysis.qmd
text: UK analysis
- href: SA_analysis.qmd
text: South Africa analysis
format:
html:
toc: true second step was to create a generic final step is to create tiny ---
title: "USA"
params:
country: USA
---
{{< include analysis.qmd >}} |
Beta Was this translation helpful? Give feedback.
I've come up with a solution that works for me:
This is my
_quarto.yml
filesecond step was to create a generic
analysis.qmd
file, which has all of the R code.final step is to create tiny
qmd
files for each page, that effectively are the params, and include theanalysis.qmd
code. here's an example: