| Crates.io | rusty-html |
| lib.rs | rusty-html |
| version | 0.1.2 |
| created_at | 2022-02-28 10:57:42.823223+00 |
| updated_at | 2022-07-16 15:28:40.49539+00 |
| description | This crate allows for Jsx html inline like syntax in rust |
| homepage | |
| repository | https://github.com/michaelvanstraten/rusty-html |
| max_upload_size | |
| id | 540802 |
| size | 5,955 |
This crate allows for Jsx html inline like syntax in rust
use rusty_html::html;
fn main() {
let html = html! {
<html>
<head>
<title>Page Title</title>
</head>
<body>
{
vec!["ad", "sdf", "sdfsdf"].into_iter().map(|s| {
html!{
<p>{s}</p>
}
}
).collect::<Vec<String>>()
}
<h1>sfsdf</h1>
<p>My first paragraph.</p>
</body>
</html>
};
println!("{}", html);
}
License: MIT