3 ms·
As another Nix person who’s just made public a Nix -> HTML library (https://news.ycombinator.com/item?id=46139067 https://news.ycombinator.com/item?id=46139067
by embedding-shape 11mo ago
As another Nix person who’s just made public a Nix -> HTML library (https://news.ycombinator.com/item?id=46139067 https://news.ycombinator.com/item?id=46139067
), I’m curious what you think about a syntax like this instead?
[ "div#main.container" { lang = "en"; } [ "h1" "Hello" ] ]
Would turn into:
<div class="container" id="main" lang="en"><h1>Hello</h1></div>
I think I've hit the sweat-spot with the hiccup-inspired way of just using Nix data, and avoids a whole shebang of templating issues since it's not actually templates, just Nix data and expressions.