write-html

Crates.iowrite-html
lib.rswrite-html
version0.1.3
sourcesrc
created_at2023-04-21 08:28:52.715095
updated_at2023-08-03 17:34:47.416337
descriptionA crate for writing HTML in Rust
homepagehttps://github.com/OpenPhysicsNotes/write-html
repositoryhttps://github.com/OpenPhysicsNotes/write-html
max_upload_size
id845125
size64,096
Luca Ciucci (LucaCiucci)

documentation

https://docs.rs/write-html

README

write-html

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.

Example

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();
Commit count: 18

cargo fmt