-
DescriptionIs it possible to specify which YAML file to use in the # _variables_Lab_A.yml
address:
email:
# _variables_Lab_B.yml
address:
email: and the variable:
default: Lab_A Then I can write a sentence like this in qmd files: # _variables.yml
Lab_A:
address:
email:
Lab_B:
address:
email: The content will be A workaround is to use two profiles ::: {.content-visible when-profile="Lab_A"}
Our email is {{< var Lab_A.email >}}.
:::
::: {.content-visible when-profile="Lab_B"}
Our email is {{< var Lab_B.email >}}.
::: The profile:
default: Lab_A But this is a little redundant. Maybe I can define variables in the two profiles but I think variables should be in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you want variables to depend on profiles, then the conditional content approach is the good and only one for now at least. See: |
Beta Was this translation helpful? Give feedback.
_variables.yml
is not conditional on profiles._variables.yml
is not the same thing as_quarto.yml
, i.e., the variable shortcode don't access_quarto.yml
but the meta shortcode does._quarto.yml
stores metadata.If you want variables to depend on profiles, then the conditional content approach is the good and only one for now at least.
See: