A DSL for writing type-safe HTML, XML, and RSS in Swift ↦
It can be used to build websites, documents and feeds, as a templating tool, or as a renderer for higher-level components and tools. It’s primary focus is on static site generation and Swift-based web development.
I’ve always enjoyed using DSL’s like this.
let html = HTML(
.head(
.title("My website"),
.stylesheet("styles.css")
),
.body(
.div(
.h1("My website"),
.p("Writing HTML in Swift is pretty great!")
)
)
)
Discussion
Sign in or Join to comment or subscribe