| Crates.io | write-html |
| lib.rs | write-html |
| version | 0.1.3 |
| created_at | 2023-04-21 08:28:52.715095+00 |
| updated_at | 2023-08-03 17:34:47.416337+00 |
| description | A crate for writing HTML in Rust |
| homepage | https://github.com/OpenPhysicsNotes/write-html |
| repository | https://github.com/OpenPhysicsNotes/write-html |
| max_upload_size | |
| id | 845125 |
| size | 64,096 |
A simple and fast html generator
:warning: This project is still in development and is not ready for production use, it is also not so fast, yet.
use write_html::*;
let page = html!(
(Doctype)
html lang="en" {
head {
(DefaultMeta)
title { "Website!" }
}
body {
h1 #some-id { "H1" }
h2 { "H2" }
h3 { "H3" }
p { "Paragraph" }
ol {
li { "Item 1" }
li { "Item 2" }
li style="color: red" { "Item 3" }
}
footer;
}
}
).to_html_string().unwrap();