From 99aae5acfe09b9df4855e79c1517daad9af8e1a9 Mon Sep 17 00:00:00 2001 From: JRS1986 <1651269+JRS1986@users.noreply.github.com> Date: Tue, 19 May 2026 18:55:06 +0200 Subject: [PATCH] Fix rspress base path for GitHub Pages project deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Pages serves this project at https://jrs1986.github.io/CodingScaffold/, a sub-path. rspress was emitting asset URLs at the apex (e.g. /static/css/styles.css) which resolved to jrs1986.github.io/static/... and 404'd — leaving the deployed site rendered as unstyled HTML with a giant raw GitHub SVG. Setting base: '/CodingScaffold/' in rspress.config.ts makes the generator prefix every emitted href/src so assets resolve at the right URL. Verified locally: doc_build/index.html now references /CodingScaffold/static/css/... etc. Trailing slash matters — rspress normalizes URLs against it. The local `npm run dev` server still works because rspress strips base when serving from 127.0.0.1. --- docs/rspress.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/rspress.config.ts b/docs/rspress.config.ts index 0fa246a..4ade8c0 100644 --- a/docs/rspress.config.ts +++ b/docs/rspress.config.ts @@ -5,6 +5,11 @@ import { pluginLlms } from '@rspress/plugin-llms'; export default defineConfig({ root: path.join(__dirname, 'docs'), title: 'CodingScaffold', + // GitHub Pages serves this project at https://jrs1986.github.io/CodingScaffold/. + // Without `base`, rspress emits asset URLs at /static/... which resolve to the + // jrs1986.github.io apex and 404, leaving the deployed site unstyled. The trailing + // slash matters — rspress normalizes URLs against it. + base: '/CodingScaffold/', builderConfig: { server: { host: '127.0.0.1',