This documentation site is generated by sitegen.nix, a pure Nix static site generator.
No external tools or build steps required beyond Nix itself.
| Feature | Description |
|---|---|
| Pure Nix | Entire generator written in Nix - no shell scripts, no external build tools |
| Markdown to HTML | Converts docs/*.md to HTML using pulldown-cmark |
| Category Navigation | Documentation organized by topic: Getting Started, Architecture, Development, Types, API, Testing, Security, Vision |
| Dark Mode | Automatic dark/light theme via prefers-color-scheme |
| GitHub Releases | Static release downloads fetched at build time via Nix fixed-output derivation |
| Provenance | Every page shows commit, tag, date, CI user, and pipeline info |
| Self-documenting Infra | Nix packages, apps, and containers documented from flake metadata |
| Incremental Builds | Each markdown file is a separate derivation for faster rebuilds |
| OpenGraph & Twitter Cards | Social media preview cards with per-page titles, descriptions, and images |
| RSS Feed | Subscribe to documentation updates via /feed.xml with autodiscovery |
| Sitemap with XSLT | Human-readable sitemap at /sitemap.xml with browser-viewable styling |
| Canonical URLs | Every page has a canonical URL for proper SEO indexing |
| JSON-LD | TechArticle, BreadcrumbList, and SoftwareApplication schemas for rich search snippets |
| Edit on GitHub | Every documentation page links to its source for easy contributions |
| Quantum 404 | Custom error page with Schrödinger's cat - state collapses on observation |
This structure is generated dynamically from the actual sitegen outputs (100 documentation files discovered):
Uses lib.filesystem.listFilesRecursive to find all .md files in docs/:
Each markdown file becomes its own Nix derivation, enabling incremental builds:
All derivations combined with symlinkJoin:
Sitegen accepts these parameters for build provenance:
| Parameter | Type | Description |
|---|---|---|
gitRevision | string | Full commit hash |
gitShortRev | string | Short commit hash (displayed) |
gitTag | string? | Release tag (e.g., "v1.0.0") |
buildDate | string? | Build date (e.g., "2025-01-08") |
ciUser | string? | CI actor (e.g., "github-actions") |
ciPipeline | string? | Workflow name |
ciRunId | string? | GitHub Actions run ID (links to run) |
Pass Nix infrastructure metadata to generate the infrastructure page:
| Parameter | Type | Description |
|---|---|---|
nixPackages | [{name, description}] | List of buildable packages |
nixApps | [{name, description}] | List of runnable apps |
nixContainers | [{name, description, image, architectures, ports}] | List of container images |
To add new documentation:
docs/ (e.g., docs/guides/my-guide.md)guides/).md extension (auto-rewritten to .html)Directories organized by topic (8 categories defined):
| Directory | Description |
|---|---|
getting-started/ | Entry points |
architecture/ | System design |
development/ | Workflows |
types/ | Type reference |
api/ | API reference |
security/ | Security |
testing/ | Test guides |
vision/ | Future direction |