orchard
mirrorEvery site I host, in one repo, along with the Cloudflare Tunnel and Caddy that front them. It's all Go, Vite, and SQLite, and it runs on a desktop at home with nothing listening on an inbound port.
blogbuncaddycloudflare-tunneldockergogolanghomelabhtml-templatemonorepoself-hostedseosqlitestatic-sitetypstuptime-monitoringviteweb-analytics
1//go:build !embed
2
3package main
4
5import (
6 "io/fs"
7 "os"
8)
9
10// In development the templates and stylesheet are read from disk on every
11// request, so editing CSS and reloading the browser is enough to see it.
12//
13// The release build uses assets_embed.go instead. This split exists because an
14// embedded stylesheet is baked into the binary at compile time, so a CSS edit
15// silently does nothing until a rebuild, which looks exactly like a CSS bug.
16func assets() fs.FS { return os.DirFS(".") }
17
18// Reloaded reports whether assets come off disk, so the server can say so.
19const Reloaded = true