Commit 036f01c663

036f01c6635468bd2b71bf8eb26012d9f653d013

parent: a19b44866f

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-03 20:17 UTC

document /img/ symlink deployment prerequisite

Layout: unified · split

README.md +22
@@ -99,6 +99,28 @@ ENV=prod uv run build.py
9999uv run build.py
100100```
101101
102## Deployment
103
104Production builds emit root-relative URLs (`/styles.min.css`,
105`/img/blog/...`) instead of absolute `https://` ones so the site renders
106standalone on the onion service without fetching assets off-onion.
107
108This means the web server must serve the image store at `/img/` on the
109`cleberg.net` vhost. The images live at `/var/www/img/` (their own host,
110`img.cleberg.net`); expose them under `cleberg.net/img/` with a symlink:
111
112``` shell
113ln -s /var/www/img /var/www/cleberg.net/img
114```
115
116Without this, images 404 in production. Development builds keep the
117absolute `img.cleberg.net` URLs, so local previews load images from the
118live host and need no symlink.
119
120Once assets are same-origin, the vhost CSP can tighten `img-src`,
121`style-src`, and `font-src` back to `'self'`. After deploying, purge the
122Cloudflare cache (responses carry a 31-day `max-age`).
123
102124## Creating New Blog Posts
103125
104126To add new blog content, follow this procedure within Emacs: