Liquid Hello World



examples/liquid/liquid-hello-world/Cargo.toml
[package]
name = "liquid-hello-world"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
liquid = "0.26"

examples/liquid/liquid-hello-world/src/main.rs
fn main() {
    let template = liquid::ParserBuilder::with_stdlib()
        .build()
        .unwrap()
        .parse("Welcome to {{name}}")
        .unwrap();

    let globals = liquid::object!({
        "name": "Liquid"
    });
    let output = template.render(&globals).unwrap();

    println!("{}", output);
}

Welcome to Liquid