From 27d044082679cdcfbeefb633756d2e399dfaadc2 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sat, 8 Aug 2026 15:09:46 +0700 Subject: [PATCH] fix(website): relative asset base so the site renders when served from a subpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy finally reached the web and served a blank page. Cause: vite `base: '/'` emits absolute asset URLs. GitHub Pages serves this repository as a project site under /trinity/, so index.html asked for /assets/index-*.js — which resolves to the apex root, where that file does not exist (404). No bundle, no React, blank page. Verified directly: 404 https://t27.ai/assets/index-C0-LRwGj.js 200 https://t27.ai/trinity/assets/index-C0-LRwGj.js Fix: `base: './'` so assets are addressed relative to wherever index.html sits — correct at the apex AND under /trinity/. Safe because routing is HashRouter, so there is no server-side path resolution to worry about. Also made the manifest link relative for the same reason. Build output now has zero absolute local paths. Co-Authored-By: Claude Opus 5 --- apps/website/index.html | 2 +- apps/website/vite.config.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/website/index.html b/apps/website/index.html index 859951ef7e..70b71646ba 100644 --- a/apps/website/index.html +++ b/apps/website/index.html @@ -6,7 +6,7 @@ - + diff --git a/apps/website/vite.config.ts b/apps/website/vite.config.ts index 14c4f63750..ade4a556b1 100644 --- a/apps/website/vite.config.ts +++ b/apps/website/vite.config.ts @@ -4,7 +4,11 @@ import path from 'path' // https://vite.dev/config/ export default defineConfig(() => ({ - base: '/', // Custom domain t27.ai (no subpath) + // Relative base so the built SPA works wherever it is served from: the apex + // (t27.ai/) and the project-pages subpath (t27.ai/trinity/) alike. With '/' + // the subpath deploy asked for /assets/... at the apex root, got 404s, and + // the page rendered blank. Safe here because routing is HashRouter. + base: './', plugins: [react()], resolve: { alias: {