-
Notifications
You must be signed in to change notification settings - Fork 26
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Metadata may drive inclusion or omission of content divs via .content-visible when-meta=
or .content-hidden when-meta=
however the implementation for users is a little tough to navigate.
Metadata can be added during execution via something like:
#| output: asis
cat(
"---",
paste0("my_metadata": true"),
"---",
sep = "\n"
)
or more programmatically:
#| echo: false
import yaml
from IPython.display import Markdown
def quarto_metadata(**kwargs):
result = "---\n" + yaml.safe_dump(kwargs) + "---\n"
return Markdown(result)
opts = {}
opts["my_metadata"] = True
quarto_metadata(**opts)
but this is rather abstract for most users. Additionally, there are important elements to understand around order of operations for knitr / jupyter and pandoc.
See rich-iannone/quarto-email#9 for a prime use case, but smoothing out these edges will be relevant beyond conditional emails. Improvements could include wrappers around metadata manipulation to make this more ergonomic.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request