This explains how a personal site was made to serve fully ANSI-escape-marked pages viewable with curl in a terminal. Inspiration came from earlier curl-savvy sites, but the implementation differs: a few pages were hand-written with ANSI escape codes (the author kept ESC (\x1b) handy in a Vim register and referenced the Wikipedia graphics codes) while the rest of the blog was generated automatically because the custom markup language, Gemroff, already supports ANSI-markup output. That prior design choice and a static site generator that can produce multiple output formats made it trivial to produce curl versions of every post; others who generate terminal UIs on-the-fly (e.g., with ratatui) take a different approach. The write-up notes Windows quirks (cmd.exe disables ANSI by default; PowerShell aliases curl), and mentions that providing a handful of handcrafted pages would be an acceptable, simpler alternative.
Serving the curl output required only small webserver tweaks: Nginx rules to detect curl user-agents, serve the ANSI files statically, and include an override header (X-Original: true) so clients can still request unmodified HTTP responses. The author frames this as a fun, nonstandard but neat gimmick that could be more widely adopted, and adds a short defense of using em dashes, noting Gemroff has explicit em-dash support and critiquing claims about AI-generated punctuation.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.