1 unstable release
0.1.2 | Sep 17, 2024 |
---|---|
0.1.1 |
|
0.1.0 |
|
#221 in Template engine
18KB
fluskama
an askama wrapper for the fluffer gemini server framework. it eases serving gemini pages written in askama by creating a wrapper for askama's template type.
contributing
send patches to the mailing list. prefix patches
with "[PATCH fluskama]
".
see the guide to git send-email
if this is your first time using
sourcehut.
license
fluskama is licensed under the gnu lesser general public license, version 3 or later. refer to the license for details
lib.rs
:
fluskama
an askama wrapper for the fluffer gemini server framework. it eases serving gemini pages written in askama by creating a wrapper for askama's template type.
wrapping a template
as previously mentioned, fluskama works as a wrapper for any askama templates. in order to wrap a template,
we can call FluffTemplate::from()
use fluskama::FluffTemplate;
use askama::Template;
#[derive(Template)]
#[template(path = "page.gmi", escape = "txt")]
struct Page {
name: String,
age: u8,
}
async fn page() -> FluffTemplate<Page> {
let template = Page {
name: String::from("John Doe"),
age: 21
};
FluffTemplate::from(template)
}
Dependencies
~10–22MB
~288K SLoC