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

510 B · 16 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 and `make pdfs` can rewrite them
11// under a running server. It is a build tag and not a runtime check because
12// //go:embed needs these directories at compile time, and a fresh clone has none.
13func distFS() fs.FS { return os.DirFS(dir("SITE_DIST", "build/dist")) }
14func pdfsFS() fs.FS { return os.DirFS(dir("SITE_PDFS", "build/pdfs")) }
15func ogFS() fs.FS   { return os.DirFS(dir("SITE_OG", "build/og")) }