From 30480b2c2364294ab33d0ddda725da5e8300538f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 25 Oct 2025 17:25:58 +0300 Subject: [PATCH] chore(website/i18n): start generating routes --- apps/website/src/index.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/website/src/index.tsx b/apps/website/src/index.tsx index 10680c4fa..595b99743 100644 --- a/apps/website/src/index.tsx +++ b/apps/website/src/index.tsx @@ -7,6 +7,7 @@ import { NotFound } from './pages/_404.jsx'; import Footer from './components/Footer.js'; import GetStarted from './pages/GetStarted/get-started.js'; import SupportUs from './pages/SupportUs/SupportUs.js'; +import { LOCALES } from './i18n'; export function App(props: {repoStargazersCount: number}) { return ( @@ -14,7 +15,7 @@ export function App(props: {repoStargazersCount: number}) {
- + @@ -35,6 +36,17 @@ export async function prerender(data) { // This ensures the GitHub API is not called on every page load in the client. const stargazersCount = await getRepoStargazersCount(); - return await ssr(); + const result = await ssr(); + console.log("Got links ", result.links); + const links: string[] = []; + for (const locale of LOCALES) { + for (const link of result.links?.values() ?? []) { + links.push(locale.id + link); + } + } + return { + ...result, + links + }; }