From 0760e735ec7cece6aeb2a2d43804eaa6fc2e3c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Vogel?= Date: Sun, 25 Oct 2026 20:25:44 +0100 Subject: [PATCH] Serve the IDE at the organization's root, glpython-edu.github.io The repo becomes glpython-edu/glpython-edu.github.io, which GitHub Pages serves at https://glpython-edu.github.io/. Vite's default base / now applies in production too; share links follow through BASE_URL. Co-Authored-By: Claude Opus 5.5 --- README.md | 12 ++++++------ vite.config.ts | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8f2327d..3dcfd75 100644 --- a/README.md +++ b/README.md @@ -99,12 +99,12 @@ the Vite headers. ## Deployment -This app is published to GitHub Pages at the `/glpython/` sub-path (see the -`base` option in `vite.config.ts`). Because `vite preview` doesn't serve the -build under that sub-path by default, locally previewing the exact production -layout requires serving `dist/` from a path ending in `/glpython/` (for -example via a symlink into a static file server), rather than running -`npm run preview` directly at the site root. +Every push to `main` publishes the app to GitHub Pages at the organization's +root, (the repo is named +`glpython-edu.github.io`). `npm run build && npm run preview` serves the same +layout locally. The embed for LiaScript courses lives next to it, at +, deployed from +glpython-editor. ## Next integration step diff --git a/vite.config.ts b/vite.config.ts index a3f3fbb..7e8eab5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,10 +9,10 @@ const crossOriginIsolationHeaders = { } // https://vite.dev/config/ -export default defineConfig(({ command }) => ({ - // GitHub Pages serves this project from /glpython/, so assets and the - // Pyodide worker need to be requested under that base path in production. - base: command === 'build' ? '/glpython/' : '/', +// The repo is glpython-edu/glpython-edu.github.io, so GitHub Pages serves the +// IDE at the organization's root, https://glpython-edu.github.io/, and Vite's +// default base "/" applies in production too. +export default defineConfig({ plugins: [react()], // glpython-editor's Pyodide worker is loaded via // `new Worker(new URL('./pyodide-worker.js', import.meta.url))`, resolved @@ -31,4 +31,4 @@ export default defineConfig(({ command }) => ({ preview: { headers: crossOriginIsolationHeaders, }, -})) +})