8356
Wx
www-xonecas-io / files
www-xonecas-io / tickets / 1002-scaffold-the-static-site-generator-and-local.md
2.3 KB
1--- 2id: 1002 3title: Scaffold the static site generator and local dev server 4type: feature 5status: done 6priority: p1 7area: site 8created: 2026-11-07T19:30:00Z 9updated: 2026-11-08T03:58:22Z 10source: agent 11moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-08T01:09:37Z todo doing drag; 2026-11-08T01:13:42Z doing review agent; 2026-11-08T03:58:22Z review done drag 12--- 13 14Build the skeleton: one command turns local bare git repos into a folder of static files, one command serves it locally. 15 16Why static: the VPS already runs Caddy and is production for IRVC, so the site adds no new process there. It also suits a read-only browser. 17 18Needs from xonecas: runtime. Options: a dependency-free TypeScript script on Bun or Node, or one Go binary. I recommend Go: one binary, matches IRVC's backend, and shelling out to git needs nothing else. Either one works. 19 20Done when: a local build from a fixture repo outputs a page and it is served on localhost. Nothing touches the VPS. No testing ever happens there. 21 22## Notes 23 24- 2026-11-08 01:11Z (agent): Decision from xonecas (terminal): Go, with htmx and Tailwind as the starting point. 25 26- 2026-11-08 01:13Z (agent): Done: the scaffold builds a static site from bare repos and serves it on localhost. 27 28 WHAT IS THERE: 29 - cmd/site: 'site build' reads every *.git in -repos (default repos/) and writes -out (default public/). 'site serve' serves the folder on 127.0.0.1:8080. 30 - internal/repo: reads bare repos by shelling out to git (name, commit count, last commit). Empty repos work. 31 - internal/site: html/template pages embedded in the binary, and Tailwind v4.3.3 compiling site.css from @theme tokens. The tokens are placeholders until 1001. 32 - Makefile: 'make build', 'make serve' and 'make test'. The first build downloads the pinned Tailwind standalone binary into bin/, so there is no npm. 33 - .gitignore: bin/, public/ and repos/ (the 1003 store). 34 - htmx is not added yet. Nothing needs it until the filters in 1006. 35 36 CHECKED: 'go vet' and 'go test' pass. The test builds from a fixture bare repo plus an empty one and checks the page. By hand: a fixture repo, then 'make build REPOS=<fixture>' and 'site serve' on 127.0.0.1:8099. curl got index.html with the repo and its commit, and site.css (9.5 kB) with 200. 37 NOT CHECKED: a browser render. The page is a bare list until the style and data tickets. 38 Nothing touched the VPS.