Skip to content

Commit 510e1d2

Browse files
committed
ci: fix basename for gh pages
1 parent 73b4c1d commit 510e1d2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@vemonet/mcp-registry",
33
"private": true,
44
"type": "module",
5+
"homepage": "https://vemonet.github.io/mcp-registry",
56
"scripts": {
67
"build": "react-router build",
78
"dev": "react-router dev",

react-router.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import type { Config } from '@react-router/dev/config';
22

3+
// Enable a router basename only during development. During build/production
4+
// we avoid setting a basename so we still generates a index.html at the root
5+
const isDev = import.meta.env.MODE === 'development';
6+
37
export default {
48
ssr: false,
5-
// basename: '/mcp-registry/',
9+
...(isDev ? { basename: '/mcp-registry' } : {}),
10+
// If you prefer a trailing slash version, change above to '/mcp-registry/'.
611
// https://reactrouter.com/start/framework/rendering#static-pre-rendering
712
async prerender() {
813
return ['/'];

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import tsconfigPaths from 'vite-tsconfig-paths';
55

66
export default defineConfig({
77
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
8-
// base: '/mcp-registry/',
8+
base: '/mcp-registry',
99
});

0 commit comments

Comments
 (0)