Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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();
```