Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

MiniJinja Basic Example

rust
```cargo
[dependencies]
minijinja = { version = "1.0", features = ["loader"] }
```

use minijinja::{Environment, context};

fn main() {
    let mut env = Environment::new();
    env.add_template_owned(
        "hello", "Hello {{ name }}!".to_string()
    ).unwrap();
    let skeleton = env.get_template("hello").unwrap();
    let output = skeleton.render(context!(name => "World")).unwrap();
    println!("{}", output);
}
results start

This is a basic MiniJinja example. It's pulled directly from the docs with one change. It uses ` .add _ template _ owned() [TODO: Code shorthand span ] so that strings (i.e. ` String [TODO: Code shorthand span ] .