quarto-dev / quarto-dev/quarto-cli
params should work with `metadata-files`
@cscheid is already working on this.
Since Feb 24, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/3658
Originally posted by GScottAlder December 13, 2022
NOTE:
I am using the quarto R package version 1.0 and quarto version 0.9.80
I found the version by running this code: as.numeric_version(system2(quarto:::find_quarto(), "--version", stdout = TRUE))
Due to some IT restrictions I have not updated quarto to the most recent release, although I may be able to in the future.
I have multiple *.qmd files that I want to be parameterized. I want them to share parameters and default values by inheriting from a separate YML file.
For example, I have a file named test.qmd with this YML header:
---
title: "Test Quarto Report"
metadata-files:
- _params.yml
---
Then, in _params.yml I have
---
params:
p1: 1.0
p2: "A"
p3: TRUE
---
However, this does not work. When I run quarto render, I get an error for "object 'params' not found"
Is there anything I can do to inherit params? Is this not possible in quarto 0.9.80? If so, is it possible in a later release?
Thanks,
Scott
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.