~eze-works/toph

An HTML generation library
Bumpt version
Clean up doc tests
(breaking) Expression syntax change

clone

read-only
https://git.sr.ht/~eze-works/toph
read/write
git@git.sr.ht:~eze-works/toph

You can also use your local clone with git send-email.

#Toph

Toph is an HTML generation library. It's implemented as a declarative macro, html!, that transforms your markup into imperative code to build up an HTML tree. This tree can then be converted to a string.

let _ = toph::html! {
    doctype["html"]
    html {
        title {
            (toph::text("hello world"))
        }
    }
    body {
        p[class = "intro"] {
            (toph::text("This is an example of the "))
            a[href = "https://git.sr.ht/~eze-works/toph/"] {
                (toph::text(" template language"))
            }
        }
    }
};