A HTML rendering engine implemented in the Nix module system.
Yes indeed! It's the Document Object Model (DOM) implemented all over again, but with Nix modules.
Because we always wanted type-safe, correct-by-construction HTML, and we always wanted it in the most painful way.
Also because the Nix language intrudes oneself upon us as a templating engine, and is not that bad at it.
Check test.nix
for examples of what one can do with htmnix
.
-
Clone this repository:
git clone git@github.com:fricklerhandwerk/htmnix
-
Set up direnv
-
Enable direnv for this repository:
cd htmnix direnv allow
-
Run the tests:
nix-unit test.nix
-
Add more HTML data structures to
lib/dom.nix
and test that they work.
Tip
Run tests in a loop:
find . | entr nix-unit test.nix