Skip to content

How do I render the same qmd multiple times, with different parameters, through _quarto.yml #7805

Discussion options

You must be logged in to vote

I've come up with a solution that works for me:

This is my _quarto.yml file

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 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 the analysis.qmd code. here's an example:

---
title: "USA"
params:…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@mcanouil
Comment options

@aborruso
Comment options

@cscheid
Comment options

@mcanouil
Comment options

@mcanouil
Comment options

Answer selected by f2il-kieranmace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants