yet another static site generator
648 KiB | 15 commits
git clone https://khoe.thac.loan/loa
loa (Vietnamese, noun): megaphone
Loa is a dead simple static site generator that I use for my blog at https://loa.thac.loan.
mkdir mysite
cd mysite
# Write site metadata
cat > _loa_meta.json << EOF
{
"site_name": "Loa Sample Site",
"tagline": "Who samples the samplers?",
"domain": "https://blog.example.com",
}
EOF
# Create a post.
# Loa assumes frontmatter followed by djot markup: https://djot.net/
mkdir first
cat > first/index.dj << 'EOF'
```
title: First
published_at: 2025-10-09T21:13:03+07:00
```
## This is my very dope blog post
The quick brown fox jumps over the lazy dog.
EOF
# Generate!
loa
# or:
loa .
Loa targets zig 0.15.1 and by default has no runtime dependency except for libc. You can optionally dynamically link lua 5.4 with -fsys=lua.
# either command works:
zig build -Doptimize=ReleaseSafe
zig build -Doptimize=ReleaseSafe -fsys=lua
If you're curious, lua is used for running djot.lua, which is vendored in src/vendor/djot.lua.
Unfortunately loa shells out to date because zig doesn't come with a standard datetime library yet and I'm too lazy to implement one.
Copyright © 2025 tri@thac.loan
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program (agpl-3.0.txt). If not, see https://www.gnu.org/licenses/.