3 unstable releases
0.2.1 | Jan 2, 2024 |
---|---|
0.2.0 | Aug 27, 2021 |
0.1.0 | Jun 7, 2021 |
#33 in #trillium
68KB
1K
SLoC
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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
~9–17MB
~287K SLoC