minimal static site generator in zig.
requires zig (0.14+).
zig build -Doptimize=ReleaseFast
cp zig-out/bin/ypsilanti /usr/local/bin/
-Doptimize options: Debug (default), ReleaseSafe, ReleaseFast, ReleaseSmall. use ReleaseFast for production, skip the flag for development.
ypsilanti build ./site ./output # build site
ypsilanti serve ./site # dev server on :3000
ypsilanti serve ./site 8080 # custom port
site/
├── content/ # markdown files → html
├── layouts/ # page templates
├── partials/ # reusable snippets
├── static/ # copied as-is (css, images, fonts)
└── url # optional: base url for rss/sitemap
---
title: Hello World
date: 2025-01-09
description: post summary for rss
layout: post
---
your content heretitle- page title, available as{{title}}date- includes page in rss feeddescription- rss item descriptionlayout- which layout to use fromlayouts/
any key is available as {{key}} in templates.
layouts go in layouts/. use {{content}} for the rendered markdown:
<!DOCTYPE html>
<html>
<head><title>{{title}}</title></head>
<body>
{{> header}}
<main>{{content}}</main>
</body>
</html>partials go in partials/. include with {{> name}}:
<!-- partials/header.html -->
<nav><a href="/">home</a></nav>supported:
# headers(h1-h6)**bold**and*italic*[links](url)`inline code`- fenced code blocks with language class
- unordered lists> blockquotes
create content/404.md for custom 404 pages. works in dev server and most static hosts.
auto-generated on build:
sitemap.xml- all pagesfeed.xml- pages withdate:front matter
set base url in site/url:
https://example.com
build to docs/ and enable pages from that folder:
ypsilanti build ./site ./docs
git add docs && git commit -m "build" && git push
or use github actions - see repo for example workflow.
ypsilanti serve ./site
opens dev server with live reload. edit any file in content/, layouts/, partials/, or static/ and browser refreshes automatically.
./test.sh