A static site generator written in POSIX shell

Dev builds a tiny DIY website maker on the command line; comments erupt

TLDR: One creator replaced a complex JavaScript site with a simple command-line script that builds their blog fast. The comments split between admiration for the no‑framework vibe, nitpicks that it's really sed-heavy, and demands for alternatives like Perl or Java/XSLT—sparking a lively debate on minimalism versus maintainability.

One developer just downsized their site builder, ditching a messy JavaScript setup for a bare‑bones shell script called gen.sh. Think “handmade website machine”: it stitches markdown posts into pages, tags, and feeds, then drops everything into a public folder. No fancy framework, no memory—just run it again. With the optional Markdown tool comrak, it’s fast, clocking under a second. In short: minimal parts, maximum vibes.

The comments? Chaos. mrwh cheers the DIY life: bash scripts forever. riedel nitpicks the headline—“this isn’t just shell, sed is doing a lot”—and the crowd nods knowingly. lombasihir rolls in with the eternal heckle: “why not perl?” Meanwhile, paseante stares into the abyss and types, “What is wrong with people.” vbezhenar goes pragmatic, pitching Java plus XSLT (a template tool) since Java is preinstalled on GitHub servers. Minimalism vs realism, comfort vs chaos—choose your fighter.

Jokes landed hard: “string concatenation karaoke,” “trusting line numbers like astrology,” and a throwback to the dev’s own confession of past regex crimes. Fans love the independence from big frameworks; critics warn it’s fragile and very specific. Either way, the vibes are loud, the takes are spicy, and gen.sh is now internet lore. Expect more bash vs everything showdowns. Soon.

Key Points

  • A custom static site generator (“gen.sh”) was built in POSIX shell to replace a previous JavaScript SPA.
  • The generator uses handwritten HTML/CSS and renders Markdown posts to HTML via comrak with extensions.
  • It expects posts/, include/, and template/ directories and outputs to public/.
  • A strict, line-number-based front matter defines metadata (date, title, description, tags, categories).
  • The one-pass build emits per-post pages, index, tags, drafts pages, multiple feeds (RSS/Atom/JSON), and a sitemap, completing ~714 ms for 29 posts.

Hottest takes

"What is wrong with people." — paseante
"sed is a whole programming language" — riedel
"why not perl?" — lombasihir
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.