# Curl Your Blog: How One Developer Serves a Full ANSI Site in the Terminal

Original title: Fancy Curl Sites

> Hacker News story 50093612 · language: en · submitted 2026-10-14
> Web version: https://zeli.app/story/50093612
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 140 · by [adunk](<https://news.ycombinator.com/user?id=adunk>) · 💬 29
[original](<https://nytpu.com/gemlog/2026-03-18>) · [HN discussion](<https://news.ycombinator.com/item?id=50093612>)

## Summary

nytpu explains how he built a curl-accessible version of his entire blog, complete with ANSI escape codes for terminal display. The trick relies on his custom markup language, Gemroff, which already supported ANSI output, plus a few Nginx tweaks to serve the static files when the user agent contains 'curl'. He credits trinkey and strongsand for the original idea, but notes their versions are no longer functional.

## Key quote

> It would be neat to see more sites doing this trick around!

## HN discussion (29 comments)

### [colewilson](<https://news.ycombinator.com/item?id=50095529>)

> Very neat! It's also possible to do this 100% statically without checking the user agent, by using alternate terminal buffers:
>
> \- `curl -L https://cole.ws` (my personal portfolio site) does this
>
> It embeds the actual HTML inside an alternate terminal buffer (starting with `<!--\x1b[?1049h-->\r` and ending with `<!--\x1b[?1049l\x1b[3D\r`), and has the curl-able content appended to the end.
>
> When you curl it, it still writes the HTML to your terminal, but immediately clears that buffer and writes the ANSI version to your real screen. In browsers, this ANSI stuff is hidden in an HTML comment. This is useful for static sites on GitHub pages or something.

### [classictraffic](<https://news.ycombinator.com/item?id=50094223>)

> Fun! I also did something similar with my personal website this summer:
>
> \- `curl listening.cailinpitt.com` shows what music I've been listening to recently
>
> \- `curl reading.cailinpitt.com` shows what books and articles I've been reading recently

### [jayknight](<https://news.ycombinator.com/item?id=50094314>)

> \>If you were just trying to download the original HTML version of this page, add -H "X-Original: true" to the curl command to have the server respond exactly how it would've to any non-curl HTTP client.
>
> It seems like "Accept: text/html" would be more standard
>
> https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/...
>
> ... and then use `text/x-ansi` as the curl version, so other text-based clients could also fetch it:
>
> wget -O -  --header='Accept: text/x-ansi' nytpu.com/gemlog/2026-03-18
>
> See: https://www.digipres.org/formats/sources/wikidata/formats/#q...

---

## Cite

- Page: https://zeli.app/story/50093612
- Date: 2026-10-14
- Source: nytpu.com (https://nytpu.com/gemlog/2026-03-18)
- Hacker News: https://news.ycombinator.com/item?id=50093612

## Other languages

- zh: https://zeli.app/zh/story/50093612 · markdown: https://zeli.app/zh/story/50093612.md
- ja: https://zeli.app/ja/story/50093612 · markdown: https://zeli.app/ja/story/50093612.md
- ko: https://zeli.app/ko/story/50093612 · markdown: https://zeli.app/ko/story/50093612.md
- de: https://zeli.app/de/story/50093612 · markdown: https://zeli.app/de/story/50093612.md
- es: https://zeli.app/es/story/50093612 · markdown: https://zeli.app/es/story/50093612.md
- ru: https://zeli.app/ru/story/50093612 · markdown: https://zeli.app/ru/story/50093612.md
