htmly
Dead-simple, easy-to-use HTML generation macros
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | BSD-3-Clause |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-05 07:27 |
Tags
Authors
- penguinite
Installation
nimble install htmly
choosenim install htmly
git clone https://codeberg.org/brulee/htmly
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| htmly | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 2.0.0 | No |
Source
| Repository | https://codeberg.org/brulee/htmly |
|---|---|
| Homepage | https://docs.penguinite.dev/htmly/ |
| Registry Source | nimble_official |
README
htmly
Dead-simple, easy-to-use HTML generation macros for Nim.
import htmly
h1 {"class": "title"}:
"It could not be easier!"
p:
"Nest as many "
a {"href": "#"}: "elements"
" as you need!"
This generates the following HTML:
<h1 class="title">It could not be easier!</h1>
<p>Nest as many <a href="#">elements</a> as you need!</p>
Why not Karax?
Karax's HTML generator is pretty nice, but difficult to integrate. Ultimately, it is kind of disappointing that you need to import a huge frontend library just for decent HTML generation, and the text syntax is a bit ugly and not even neccessary.
std/htmlgen and htmly both can do without it.
Why not std/htmlgen
If you're looking to accomplish the same basic task without adding on dependencies, then std/htmlgen is the right tool for you. I personally find the nested tree of parenthesis that you get when using std/htmlgen to be too annoying, dense and difficult to read, so I've created this one that is slightly better for the eyes.