diff --git a/apps/classroomio-com/vercel.json b/apps/classroomio-com/vercel.json index 74dc6b97..1f0de688 100644 --- a/apps/classroomio-com/vercel.json +++ b/apps/classroomio-com/vercel.json @@ -2,15 +2,11 @@ "rewrites": [ { "source": "/docs", - "destination": "https://ciodocs.vercel.app" + "destination": "https://ciodocs.vercel.app/docs" }, { "source": "/docs/:path*", - "destination": "https://ciodocs.vercel.app/:path*" - }, - { - "source": "/assets/:path*", - "destination": "https://ciodocs.vercel.app/assets/:path*" + "destination": "https://ciodocs.vercel.app/docs/:path*" } ] } diff --git a/apps/docs/src/router.tsx b/apps/docs/src/router.tsx index 3a956b5f..cf81bef7 100644 --- a/apps/docs/src/router.tsx +++ b/apps/docs/src/router.tsx @@ -4,6 +4,7 @@ import { routeTree } from './routeTree.gen'; export function getRouter() { return createTanStackRouter({ + basepath: '/docs', defaultNotFoundComponent: NotFound, defaultPreload: 'intent', routeTree, diff --git a/apps/docs/vite.config.ts b/apps/docs/vite.config.ts index 83f43c38..31eb2f96 100644 --- a/apps/docs/vite.config.ts +++ b/apps/docs/vite.config.ts @@ -10,6 +10,7 @@ export default defineConfig({ server: { port: 3000 }, + base: '/docs', plugins: [ mdx(await import('./source.config')), tailwindcss(), @@ -21,6 +22,7 @@ export default defineConfig({ // see https://tanstack.com/start/latest/docs/framework/react/guide/hosting for hosting config // we configured nitro by default nitro({ + baseURL: '/docs' // routeRules: { // '/': { // proxy: 'https://classroomio-com.vercel.app/'