> one site, two interfaces
2026-07-13 · caddy · bash · astro
This site has two front doors:
curl raghav56.tech # ANSI-rendered terminal card
open https://raghav56.tech # themed browser page
Both are static files. Nothing is rendered at request time.
How it works
Caddy matches the User-Agent header: curl, wget, and httpie get
rewritten to a pre-rendered index.txt (ANSI escapes included), everyone else
gets index.html. The text version is rendered at build time by
glow with a custom style; the browser
version is built by Astro from the same content sources.
Why static-first
One build script produces everything, a plain file server does the serving,
and the source workspace stays private. The web server can only read the
compiled output. Dynamic things (an API, a contact form) live behind their own
/api/* routes on a separate local-only process.