Files
website/package.json
T
enricobuehler 7bf10b6a12
Build & Deploy unom website / build (push) Successful in 21s
Build & Deploy unom website / deploy (push) Successful in 4s
i18n: paraglide setup mirroring played/plaza, de unprefixed + /en/ prefixed
- project.inlang/settings.json with locales [de, en], baseLocale de.
- messages/{de,en}.json hold the strings (tagline, blog labels, etc.).
- vite.config.ts: paraglideVitePlugin compiles to src/paraglide/
  (gitignored) on dev/build. Strategy: url → cookie →
  preferredLanguage → baseLocale. URL pattern keeps German at /:path
  (unprefixed) and English at /en/:path so existing URLs stay valid.
- server.tsx wraps the handler in paraglideMiddleware so AsyncLocalStorage
  carries the per-request locale into SSR.
- router.tsx adds rewrite { input: deLocalizeUrl, output: localizeUrl }
  so route matching stays locale-agnostic — the router sees /blog while
  URLs show /en/blog.
- cms.ts narrows getLocale()'s union back to the de|en pair the CMS
  supports, used as the default for find/findGlobal calls.
- Components/routes switch to m.foo() for user-visible strings; date
  formatting picks de-DE / en-GB from getLocale().
- Root html lang reads getLocale() so the document language flips per
  request.

Known minor: TanStack Start's { title } meta entry still serves the base
locale value (og:title and the description meta are localized correctly).
Will track separately.
2026-05-26 19:23:35 +02:00

45 lines
1.1 KiB
JSON

{
"name": "@unom/website",
"private": true,
"type": "module",
"imports": {
"#/*": "./src/*"
},
"scripts": {
"dev": "vite dev --port 3000 --host",
"build": "vite build",
"start": "bun .output/server/index.mjs",
"typecheck": "tsc --noEmit",
"format": "biome format",
"lint": "biome lint",
"check": "biome check"
},
"dependencies": {
"@fontsource/inter": "^5.2.5",
"@inlang/paraglide-js": "^2.18.1",
"@payloadcms/sdk": "^3.84.1",
"@tailwindcss/vite": "^4.3.0",
"@tanstack/react-router": "latest",
"@tanstack/react-start": "latest",
"@tanstack/router-plugin": "^1.168.9",
"@unom/cms": "^0.1.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"nitro": "^3.0.260429-beta",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0"
},
"devDependencies": {
"@biomejs/biome": "2.4.15",
"@types/node": "^25.9.1",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.2",
"typescript": "^6.0.3",
"vite": "^8.0.14",
"vite-tsconfig-paths": "^6.1.1"
}
}