Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxdeviant/auk
A DSL for writing HTML using standard Rust syntax
https://github.com/maxdeviant/auk
Last synced: about 2 months ago
JSON representation
A DSL for writing HTML using standard Rust syntax
- Host: GitHub
- URL: https://github.com/maxdeviant/auk
- Owner: maxdeviant
- License: mit
- Created: 2024-01-06T16:52:43.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T20:17:53.000Z (4 months ago)
- Last Synced: 2024-08-17T21:28:21.419Z (4 months ago)
- Language: Rust
- Size: 69.3 KB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# auk
[![crates.io](https://img.shields.io/crates/v/auk.svg)](https://crates.io/crates/auk)
[![docs.rs](https://docs.rs/auk/badge.svg)](https://docs.rs/auk/)
[![crates.io](https://img.shields.io/crates/l/auk.svg)](https://github.com/maxdeviant/auk/blob/main/LICENSE)Auk is an eDSL for writing HTML using standard Rust syntax.
## Usage
```rust
use auk::*;
use auk::renderer::HtmlElementRenderer;let content = html()
.child(head().child(title().child("Auk")))
.child(body().child(h1().child("Hello from Auk!")));let rendered_html = HtmlElementRenderer::new()
.render_to_string(&content)
.unwrap();
```