From 3eec9ba8b7eead6a7153c1f4e833cf7d53f61b98 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 26 May 2026 19:33:45 +0200 Subject: [PATCH] routes/index: use m.home_title() + pass undefined locale to findPosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Title was hardcoded to the German string when I migrated the rest of the site to paraglide — the rest of the site looked correct on /en/ because the localized meta came from the root route's head() which DID use m.foo(). Index also passed 'de' literally to findPosts, ignoring the request locale. --- src/routes/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index b39e731..d01071f 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,5 +1,6 @@ import { createFileRoute } from "@tanstack/react-router"; import { findPosts } from "@/lib/cms"; +import { m } from "@/paraglide/messages"; import Landing from "@/sections/Landing"; import LatestPosts from "@/sections/LatestPosts"; @@ -7,7 +8,7 @@ export const Route = createFileRoute("/")({ loader: async () => { // Soft-fail on CMS hiccups so the hero still renders. try { - const { docs } = await findPosts("de", 2); + const { docs } = await findPosts(undefined, 2); return { posts: docs }; } catch { return { posts: [] }; @@ -15,7 +16,7 @@ export const Route = createFileRoute("/")({ }, component: HomePage, head: () => ({ - meta: [{ title: "unom - Kreative Webentwicklung" }], + meta: [{ title: m.home_title() }], }), });