|
| 1 | +import { type RouteConfig, route, index } from "@remix-run/route-config"; |
| 2 | + |
| 3 | +export const routes: RouteConfig = [ |
| 4 | + index("pages/splash.tsx"), |
| 5 | + route("/brand", "pages/brand.tsx"), |
| 6 | + route("/healthcheck", "pages/healthcheck.tsx"), |
| 7 | + route("/color-scheme", "actions/color-scheme.ts"), |
| 8 | + |
| 9 | + route("/:ref?", "pages/docs-layout.tsx", { id: "docs" }, [ |
| 10 | + index("pages/docs-index.tsx"), |
| 11 | + route("home", "pages/doc.tsx", { id: "home" }), |
| 12 | + route("*", "pages/doc.tsx"), |
| 13 | + ]), |
| 14 | + |
| 15 | + route("/*", "pages/notfound.tsx"), |
| 16 | + |
| 17 | + // short version URLs for changelogs and stuff |
| 18 | + route("/v6/*", "pages/redirect-v6-doc.tsx"), |
| 19 | + route("/v7/*", "pages/redirect-v7-doc.tsx"), |
| 20 | + |
| 21 | + // v6 URLs before the api reference docs |
| 22 | + route("/en/:ref", "pages/docs-layout.tsx", { id: "v6-docs" }, [ |
| 23 | + index("pages/docs-home.tsx", { |
| 24 | + id: "v6-index", |
| 25 | + }), |
| 26 | + route("*", "pages/doc.tsx", { id: "v6-guide" }), |
| 27 | + ]), |
| 28 | +]; |
| 29 | + |
| 30 | +if (process.env.NODE_ENV === "development") { |
| 31 | + routes.push(route("/__playground", "components/_playground/playground.tsx")); |
| 32 | +} |
0 commit comments