fix: subdomain routing fixed, favicon bundles

This commit is contained in:
2026-07-27 14:01:50 -04:00
parent 5ddbfbc429
commit 44b6e7595c
50 changed files with 376 additions and 149 deletions

View File

@@ -10,11 +10,11 @@
* - `title` → `props.title + site.titleSuffix`
* - `canonical` → explicit `props.canonical` override wins; otherwise
* `https://${site.domain}${pathname}` where `pathname` is the *public*
* browser path. Because the subdomain prefix (`/lineage`, `/nessa`, …) is
* an internal-only rewrite (applied by `vercel.json` host rewrites or, in
* their absence, by `src/middleware.ts`), `useLocation()` reports the
* prefixed path (`/lineage/privacy`) and we strip the prefix back off so
* the canonical reflects the public URL (`https://lineage.freno.me/privacy`).
* browser path. Subdomain routing is host-aware (root routes dispatch by
* `useSite()`, see `src/routes/index.tsx`/`privacy.tsx`/`deletion.tsx`),
* so `useLocation()` already reports the public path. The defensive
* prefix-strip below also handles any legacy prefixed form, so the canonical
* is always the public URL.
* - `ogImage` → explicit `props.ogImage` wins; otherwise `site.ogDefaultImage`.
* - `ogTitle` / `ogDescription` → explicit override wins; otherwise fall
* back to the base title (no suffix) / description (existing behavior).
@@ -56,13 +56,11 @@ export function resolvePageHeadMeta(
): ResolvedPageHeadMeta {
const title = `${props.title}${site.titleSuffix}`;
/**
* The canonical URL is the *public* browser URL, never the internal route
* prefix. SolidStart's file router is host-blind, so subdomain routes live
* under `src/routes/<prefix>/*` and are served either by `vercel.json` host
* rewrites OR by `src/middleware.ts` (the in-app host rewrite). Both append
* the prefix to the internal request path (`/privacy` → `/lineage/privacy`),
* so `useLocation()` reports the prefixed path — which we strip back off so
* the canonical stays `https://lineage.freno.me/privacy`.
* The canonical URL is the *public* browser URL, never any internal route
* prefix. Subdomain routing is host-aware (root routes dispatch by
* `useSite()`), so `useLocation()` returns the public path. The strip below
* is a defensive no-op for the public path and still yields the canonical
* `https://lineage.freno.me/privacy` if a prefixed form ever appears.
*/
const publicPath =
site.baseRoutePrefix &&