All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Nixtml: A Static Website Generator Built with Nix Programming Language

By

todsacerdoti

6mo ago· 2 min readenCode

Summary

Nixtml is a static website and blog generator written in the Nix programming language, inspired by Hugo. The tool provides functional HTML generation through Nix functions for common HTML tags, supports template-based layouts, and offers string templating capabilities. It's designed for developers who want to build static websites using Nix's functional programming paradigm.

Key quotes

· 5 pulled
A static website generator written in nix. Inspired by hugo.
Templates should be defined in modules under website.layouts. All templates should be a function to a string (or list of strings, that is automatically coerced to a string).
In nixtml's lib there are functions for most commonly used HTML tags which can be used like this:
The above is equivalent to defining the markup using strings in nix:
Each template in website.layouts has a speci
Snippet from the RSS feed
Static website and blog generator written in nix. Contribute to arnarg/nixtml development by creating an account on GitHub.

You might also wanna read