Skip to content

fricklerhandwerk/htmnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

127 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 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.

How do we drive this to its bitter conclusion?

Help appreciated!

  1. Install Nix

  2. Clone this repository:

    git clone [email protected]:fricklerhandwerk/htmnix
  3. Run the tests in a loop:

    nix-shell --run test-loop
  4. Edit any of the files, see repository layout for guidance

  5. Add more HTML data structures to dom.nix and more tests to verify that they work.

Repository layout

  • dom.nix

    The document object model implemented in the module system.

  • tests.nix

    Unit tests for exercising the implementation.

  • default.nix

    Entry point for building the project. This is where content, structure, and presentation are wired up.

  • shell.nix

    Convenience wrapper to enable running nix-shell without arguments.

  • lib.nix

    Reusable convenience functions. Also exposed under the lib attribute in default.nix.

  • npins

    Dependencies, managed with npins.

  • README.md

    This file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages