From f106ffe22d193d6511c5ec204125e6020e497ed5 Mon Sep 17 00:00:00 2001 From: Zebreus Date: Sun, 25 Oct 2026 02:36:28 +0100 Subject: [PATCH] Use relative URLs and fixed script names The build is flat (pages, loader.js, terminal.js, logo.png) and only uses relative URLs, so the site works wherever it is hosted, e.g. at https://berlin.ccc.de/kik/. Co-Authored-By: Claude Opus 5.5 (1M context) --- astro.config.mjs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 37a0a32..12b6d7d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,6 +1,19 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - build: { format: 'file' }, + // Relative asset URLs, so the site works wherever it is hosted, e.g. https://berlin.ccc.de/kik/ + build: { format: 'file', assetsPrefix: '.' }, compressHTML: false, + vite: { + environments: { + client: { + build: { + rolldownOptions: { + // The page's script and the terminal it loads + output: { entryFileNames: 'loader.js', chunkFileNames: 'terminal.js' }, + }, + }, + }, + }, + }, });