aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/docs/app/routes.ts
blob: d12d93cd16a0fd161353345a7cdd70797df3996d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { type RouteConfig, route } from "@react-router/dev/routes";

export default [
  // Home routes: / and /:lang
  route(":lang?", "routes/home.tsx", { id: "home" }),

  // Docs routes: /docs/* and /:lang/docs/*
  route(":lang?/docs", "routes/docs.tsx", { id: "docs" }),
  route(":lang?/docs/*", "docs/page.tsx", { id: "docs-page" }),

  // API routes
  route("api/search", "docs/search.ts", { id: "api-search" }),

  // Catch-all 404
  route("*", "routes/not-found.tsx", { id: "not-found" }),
] satisfies RouteConfig;