s4g (Stupidly Simple Static Site Generator) is an in-place static site
generator, meaning processed files are stored right next to their sources.
This simplifies composing (source dir layout is finished website layout;
static assets no longer need to be moved around) and publishing
git push your whole dir).
It aims to be beginner-friendly while encouraging users to fiddle with
html/css. To that end, the core feature set is intentionally simple:
*.htmlin the same place
index.dj+ custom template. This means the user is free to swap in their own custom home page.
The markup language of choice is Djot because it's the only Markdown derivative that actually tries to be both unambiguous and extensible.
Currently works on Linux. It should also work on macOS and Windows (probably with a tweak to how it calls nodejs), but I'm not testing that.
sudo pacman -Syu go nodejs go install go.imnhan.com/s4g@latest # Create new site s4g new -f ~/my-blog # Run program, which: # - listens to changes and automatically re-generates # - starts a local HTTP server for preview, also livereloads on changes cd ~/my-blog s4g
Distant TODO. Maybe I'll write a blog post and call it a day.
writeablefs is admittedly an unnecessary abstraction. The prospect of
replacing the native filesystem backend with something else is highly unlikely
in the first place. I simply wanted to get used to the ergonomics of
programming portably against an FS interface. I've already violated that in my
recent commits anyway. When I'm sufficiently bored I'll most likely remove it