3 unstable releases

0.2.1 Jan 2, 2024
0.2.0 Aug 27, 2021
0.1.0 Jun 7, 2021

#26 in #trillium

MIT/Apache

68KB
983 lines

Welcome to Trillium!

📖 Guide 📖

The guide provides an architectural overview and lay of the land connecting the trillium crates.

📑 Rustdocs 📑

The rustdocs represent the best way to learn about any of trillium's individual crates and the specific interfaces.




Legal:

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Handlebars templating handler for trillium based on the handlebars crate.

use trillium_handlebars::{HandlebarsHandler, HandlebarsConnExt};
let handler = (
    HandlebarsHandler::new("**/*.hbs"),
    |mut conn: trillium::Conn| async move {
        conn.assign("name", "handlebars")
            .render("examples/templates/hello.hbs")
    }
);

use trillium_testing::prelude::*;
assert_ok!(get("/").on(&handler), "hello handlebars!");

Dependencies

~10MB
~247K SLoC