repos
/ orchard main

orchard

mirror

Every 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

445 B · 15 lines · Go Raw History
 1//go:build !embed
 2
 3package main
 4
 5import (
 6	"io/fs"
 7	"os"
 8)
 9
10// A dev build reads assets off disk so Vite can rewrite them under a running
11// server. It is a build tag and not a runtime check because //go:embed needs
12// these directories to exist at compile time, and a fresh clone has neither.
13func distFS() fs.FS { return os.DirFS(dir("SITE_DIST", "build/dist")) }
14func mapsFS() fs.FS { return os.DirFS(dir("SITE_MAPS", "build/static_maps")) }