Data is passed to a template to render the final document.
render(.x, ...)
# S3 method for character
render(.x, ..., .config = default_config())
# S3 method for fs_path
render(.x, ..., .config = default_config())
# S3 method for jinjar_template
render(.x, ...)
The template. Choices:
A template string.
A path to a template file (use fs::path()
).
A parsed template (use parse_template()
).
<dynamic-dots
> Data passed to the template.
The engine configuration. The default matches Jinja defaults,
but you can use jinjar_config()
to customize things like syntax delimiters,
whitespace control, and loading auxiliary templates.
String containing rendered template.
parse_template()
supports parsing a template once and rendering multiple
times with different data variables.
vignette("template-syntax")
describes how to write templates.