1 unstable release

0.1.0 Nov 2, 2024

#203 in Template engine

Download history 141/week @ 2024-10-31 17/week @ 2024-11-07

158 downloads per month

MIT license

38KB
852 lines

gen-html

gen-html is a library for generating HTML from Rust code.

Example

use gen_html::{content::h1, inline_text::a, text_content::{div, p}};

let html = div((
    h1("This is a title"),
    p("Some paragraph"),
    p(("You can put <a> inside <p> ", a("click me").href("https://some-url.com")))
));

Dependencies

~0.5–1MB
~24K SLoC