Skip to content

fricklerhandwerk/htmnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmnix

A HTML rendering engine implemented in the Nix module system.

Wait, what?

Yes indeed! It's the Document Object Model (DOM) implemented all over again, but with Nix modules.

But why?

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.

How do we drive this to its bitter conclusion?

  1. Install Nix

  2. Clone this repository:

    git clone git@github.com:fricklerhandwerk/htmnix
  3. Set up direnv

  4. Enable direnv for this repository:

    cd htmnix
    direnv allow
  5. Run the tests:

    nix-unit test.nix
  6. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages