HeadlinesBriefing HeadlinesBriefing.com

Blogging with Gleam, Org-Mode and Pandoc

Hacker News •
×

I’ve stumbled across a method of composing programs that excites me very much. In fact, my enthusiasm is so great that I must warn the reader to discount much of what I shall say as the ravings of a fanatic who thinks he has just seen a great light. (Knuth 1984, 1)

Welcome to the first Byzantine Systems blog post. This is not my first attempt at building a website around Org-mode. I have already written about the road to Emacs maximalism in my own personal blog, where Emacs, a few questionable scripts and Nix held everything together. This time I wanted to keep the part that worked (writing everything in Emacs) while making the publishing side smaller, typed and easier to understand.

The end experiment uses Orgmode as source, Emacs as writing environment, d2 for diagrams, Pandoc as converter, Nix for build environment, and Gleam with Blogatto for a typed static-site pipeline. The post index is just a Gleam function returning a Lustre element. I only interact with the Org documents. Nix is the glue that makes the rest of the pipeline pleasantly uneventful.

Why keep everything inside Emacs? My close friend Marcos Magueta made a video arguing about BLOAT. Emacs, from a UNIX perspective, is pure bloat, but it can be good bloat. Consistency requires a central body that promulgates standards, like Apple for Macintosh. No such body exists for Unix utilities.

Source: Hacker News · Summarized by HeadlinesBriefing