Per-file variables via frontmatter key variables
#8947
rben01
started this conversation in
Feature Requests
Replies: 1 comment 6 replies
-
If you set the variables in the frontmatter, it means those are metadata so you can use the metadata shortcode to retrieve them. If you want to have a "variables" key, then I suggest to write a Lua filter/shortcode for this purpose. I don't think there is something to be done in Quarto here, but I might have missed the purpose of your request and in which way Quarto does not achieve that currently. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Currently, Quarto files can include variables in one of two ways:
{{< var foo >}}
with a project-wide_variables.yml
, or{{< meta bar >}}
from the file’s metadata. It would be great to have file-local variables with avariables
key in the frontmatter that could be used like{{< meta variables.baz >}}
(or perhaps a shorthand like{{< filevar baz >}}
).Beta Was this translation helpful? Give feedback.
All reactions