saved
Fancy curl sites
Hraness wrote this summary from a saved copy of the source. Quotations are taken word for word from the source.
gist
nytpu explains how running curl against nytpu.com returns an ANSI-colored terminal version of the whole site, an idea borrowed from trinkey's and strongsand's curl sites. The index and about pages are hand-written with escape codes, the blog comes from the Gemroff markup language's existing ANSI output, and Nginx serves the curl version to any curl user agent.
ideas
- Hand-written escape codes work. The index and about pages were written by hand with an ESC[ sequence in a Vim register and Wikipedia's SGR code table.
- Old design choices paid off. Gemroff could already emit ANSI plaintext for draft previews, and the static site generator already had several output formats for HTTP, Gemini, and Gopher.
- Routing by user agent. A few Nginx rules serve static ANSI files to curl, with an X-Original header to get the normal response.
- A gimmick is enough. A few hand-written pages are an acceptable version, since few people browse this way for long.
quotes
“It would be neat to see more sites doing this trick around!”
“since it's just a neat gimmick and no one's likely to actually use it more than a few minutes of browsing.”
“LLMs wouldn't be using emdashes if they weren't already used in human-written works.”