diff --git a/.gitignore b/.gitignore index 9d4e091..738d3ad 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,8 @@ public/props/ public/kits/ public/offices/ docs/ + +# Intermediate art for the share cards. Regenerated by +# `scripts/brand-assets/capture.mjs`; the finished cards in `public/` are what +# ships, and these are 2.8 MB of screenshot nobody needs in history. +scripts/brand-assets/art-*.png diff --git a/deploy/Caddyfile.snippet b/deploy/Caddyfile.snippet index 195d2ff..4de1fa7 100644 --- a/deploy/Caddyfile.snippet +++ b/deploy/Caddyfile.snippet @@ -18,6 +18,33 @@ # The API and the static build are deliberately the same origin. Nothing here # needs CORS, which is why TERA_CORS_ORIGIN defaults to empty — set it only for # a Vite dev server on another port. +# +# +# ## Two doors out of one root +# +# `office.` and `tera.` are one build, and the app reads its own hostname to +# decide which one it is. A crawler cannot do that — it reads the HTML and +# nothing else — so `npm run build` emits a second shell, `office.html`, which is +# byte-identical below `` and carries the office's title, description and +# share card. Point the office door's fallback at it and the two unfurl as the +# two places they are: +# +# office.lumbridgecorp.com { +# import tera_api +# root * /srv/tera/dist # the SAME root as tera., not a copy +# try_files {path} {path}/index.html /office.html +# file_server +# } +# +# The root is shared rather than copied on purpose — a deploy cannot then leave +# the two doors on different builds — and `office.html` comes out of the same +# `npm run build` as `index.html`, so the shells cannot drift from each other +# either. The only line that differs between the two site blocks is the +# `try_files` fallback. +# +# A deployment that skips this is not broken: the office door keeps working and +# simply unfurls with the city's card, which is what it did before there was a +# second shell at all. (tera_api) { handle /api/v1/* { diff --git a/index.html b/index.html index 1a6f50f..b012477 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,57 @@ and logs the 404 to the console, which buries the errors that matter. --> -
+ + +
lumbridgecorp.com
+Apache-2.0
+