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 relative links, 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. A semblance of dependent types, too.
Check tests.nix for what one can do with htmnix.
Help appreciated!
-
Clone this repository:
git clone [email protected]:fricklerhandwerk/htmnix -
Run the tests in a loop:
nix-shell --run test-loop -
Edit any of the files, see repository layout for guidance
-
Add more HTML data structures to
dom.nixand more tests to verify that they work.
-
The document object model implemented in the module system.
-
Unit tests for exercising the implementation.
-
Entry point for building the project. This is where content, structure, and presentation are wired up.
-
Convenience wrapper to enable running
nix-shellwithout arguments. -
Reusable convenience functions. Also exposed under the
libattribute in default.nix. -
Dependencies, managed with
npins. -
This file.