From 53d7b9707f1ea95fc7e5a8c1865e1b1dc14beeb4 Mon Sep 17 00:00:00 2001 From: bigbes Date: Sat, 18 Jul 2026 23:48:37 +0300 Subject: [PATCH] docs: note that static assets are embedded and need a rebuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit web/static is //go:embed-ed into the binary, so `make css`/`make bundle` alone don't reach the running daemon — re-run `make build` after either. Documents the stale-asset gotcha in the build section. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 115107d2ac71a9321489c5f93369974aea053dab..6ada61cd3e3948312f8037ef48032f65bda22d5e 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,13 @@ make css # build the hashed stylesheet (sassc + minify) make bundle # rebuild the vendored frontend bundle (esbuild) ``` +> **Static assets are `//go:embed`-ed into the binary** (`web/templates.go` +> embeds `static`). `make css` / `make bundle` only update the files under +> `web/static/` — the running daemon serves the copy baked into `./comparesrht`, +> so **re-run `make build` after either** or the change won't appear. Rebuilding +> the CSS or bundle without a following `go build` is a common way to chase a +> stale asset. + ## Configuration See `config.example.ini`. On a real instance, append the `[compare.sr.ht]`