toph

Crates.iotoph
lib.rstoph
version1.0.0
sourcesrc
created_at2024-03-13 12:29:48.673309
updated_at2024-11-05 20:24:31.0423
descriptionAn HTML generation library
homepage
repositoryhttps://git.sr.ht/~eze-works/toph/
max_upload_size
id1171663
size20,014
Eze Anyanwu (eze-works)

documentation

README

Toph

Toph is an HTML generation library. It's implemented as a declarative macro, html!, that transforms your markup into imperative code to build up an HTML tree. This tree can then be converted to a string.

let _ = toph::html! {
    doctype["html"] {}
    html {
        title {
            toph::text("hello world");
        }
    }
    body {
        p[class: "intro"] {
            toph::text("This is an example of the ");
            a[href: "https://github.com/eze-works/toph"] {
                toph::text(" template language");
            }
        }
    }
};
Commit count: 0

cargo fmt