| Crates.io | toph |
| lib.rs | toph |
| version | 2.0.1 |
| created_at | 2024-03-13 12:29:48.673309+00 |
| updated_at | 2025-05-23 22:33:09.749173+00 |
| description | An HTML generation library |
| homepage | |
| repository | https://codeberg.org/eze-works/toph |
| max_upload_size | |
| id | 1171663 |
| size | 21,164 |
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://git.sr.ht/~eze-works/toph/"] {
(toph::text(" template language"))
}
}
}
};