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

1.7 KB · 46 lines · Go Raw History
 1package main
 2
 3import "strings"
 4
 5// Identity is hardcoded. This site reads no environment variable at all in
 6// normal operation, because nothing it serves is a secret: every panel is
 7// either public market data, a public feed, or the up/down state of a site
 8// that is already on the public internet.
 9const (
10	baseURL  = "https://dash.bythewood.me"
11	siteName = "Dash"
12
13	// What the browser tab reads. siteName stays "Dash" for the structured data
14	// and the feed, since this is the tab's own wording and not the site's name.
15	titleBase  = "DASH ยท BYTHEWOOD.ME"
16	authorName = "Isaac Bythewood"
17	githubUser = "overshard"
18
19	// Must match the first hostname label, like every other source label.
20	selfSource = "dash"
21
22	// analyticsID is in the page source of every site; it is identity, not a
23	// credential. Its own property, since a copied one silently files this
24	// site's traffic under whichever site it was copied from.
25	analyticsID = "0b09f0d1-3016-411c-a003-f15ea72b20fa"
26)
27
28// Staging is true on any hostname but the real one, and keeps it out of search results.
29var Staging = !strings.HasSuffix(baseURL, "//dash.bythewood.me")
30
31const sourceURL = "https://github.com/" + githubUser + "/orchard/tree/main/sites/dash.bythewood.me"
32
33// Weather is for where Isaac is, so the coordinates are a constant rather than
34// a lookup. Yadkin Valley, North Carolina, rounded to two places because
35// open-meteo snaps to its own grid anyway and a precise home address in a
36// public repository is worth nothing to anyone.
37const (
38	weatherLat   = 36.13
39	weatherLon   = -80.62
40	weatherPlace = "Yadkin Valley, NC"
41
42	// A severe weather alert covers a dozen counties and lists them
43	// alphabetically, so this is what pulls the one worth reading to the front.
44	homeCounty = "YADKIN"
45)