From 194208d817132c6f3fdf66d3b4bbb6e01fed3d85 Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Mon, 10 Aug 2026 11:13:16 -0400 Subject: [PATCH] Fix base URL for subdirectory deployment on pages.civilytics.org - Set vite.config.mjs base to '/crdc-demo/' so asset paths resolve correctly when served from a subdirectory (not root) - Add favicon.svg in public/ folder - Update index.html with correct absolute paths including /crdc-demo/ prefix --- index.html | 3 ++- public/favicon.svg | 1 + vite.config.mjs | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 public/favicon.svg diff --git a/index.html b/index.html index 10a43d8..31f4623 100644 --- a/index.html +++ b/index.html @@ -2,12 +2,13 @@ - + CRDC Arrests API Demo — Civilytics
+ diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..b8bb935 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1 @@ + diff --git a/vite.config.mjs b/vite.config.mjs index 4acedce..a3ef45e 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -1,8 +1,11 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc' +// The app is served at /crdc-demo/ on pages.civilytics.org. +// Set base to the subdirectory so asset paths resolve correctly. export default defineConfig({ plugins: [react()], server: { port: 5173 }, build: { outDir: 'dist', sourcemap: true }, + base: '/crdc-demo/', // Required for subdirectory deployment on git-pages })