Something went wrong. Try again.
A static site builder in zig *bare-minimum
Something went wrong. Try again.
Zig 50%
HTML 35%
CSS 15%
README.md
nixi.zig #
A minimal, zero-dependency static site generator written in Zig 0.16.0.
Features #
- Markdown to HTML — headings, code blocks with language tags, lists, blockquotes, images, links, bold, italic, inline code, pipe tables, horizontal rules
- Frontmatter — YAML/TOML metadata per page (title, date, description, tags, category, draft, pinned, series)
- Templates —
{{ variable }}engine withtitle,description,content,base_url,date - RSS — auto-generated
feed.xml(RFC 2822, configurable item count) - Sitemap — auto-generated
sitemap.xmlwith static pages support - SPA mode — generate
posts.jsmetadata registry instead of HTML pages for client-side rendered sites - Dev server — built-in HTTP server with MIME detection and 404 handling
- Zero deps — pure Zig, no npm, no Node.js, no external libraries
Quick Start #
# Scaffold a new project
nixi.zig init my-site
cd my-site
# Build
nixi.zig build
# Preview
nixi.zig serve
CLI #
init PATH Scaffold a new project at PATH
build Build the current project
new PATH Create a new markdown post
serve [HOST:PORT] Start the dev server
-h, --help Show help
Configuration #
nixi.toml in the project root:
[site]
title = "My Site"
description = "Built with Nixi.zig"
base_url = ""
author = ""
language = "en"
generate_rss = true
generate_sitemap = true
rss_count = 20
use_query_params = false
[build]
output_dir = "build"
pages_dir = "pages"
static_dir = "static"
themes_dir = "themes"
theme = "default"
generate_html = true
[server]
host = "127.0.0.1"
port = 8080
Project Structure #
my-site/
nixi.toml # Site configuration
pages/ # Markdown pages
index.md
static/ # Static assets (CSS, JS, images)
style.css
themes/ # Template themes
default/
template.html
build/ # Generated output
Templates #
Themes live under themes/<name>/template.html. Available variables:
| Variable | Description |
|---|---|
{{ title }} |
Page title from frontmatter |
{{ description }} |
Page description or site description |
{{ content }} |
Rendered HTML content |
{{ base_url }} |
Site base URL from config |
{{ date }} |
Page date from frontmatter |
Building from Source #
git clone https://tangled.org/ijadux2.tngl.sh/nixi.zig
cd nixi.zig
zig build
The binary is placed at zig-out/bin/nixi.zig.
License #
MIT