Skip to main content

add_common

Function add_common 

Source
pub fn add_common(
    env: &mut Environment<'static>,
    context: RunContext,
    vars: Map<String, Value>,
    cli_vars: BTreeMap<String, String>,
)
Expand description

What every DRE template reads, for an environment built outside core’s renderers (the document plugin’s html and pdf templates): var(), raise_error(), the date functions, the number filters, run.*, target.name and Python-style methods. env_var() isn’t available: a document is data that’s delivered, and environment variables hold secrets.