From 646b77dbb7f7549a3c07fefea3c19e0e0c8e8eac Mon Sep 17 00:00:00 2001 From: vcoppe Date: Fri, 9 Aug 2024 10:04:29 +0200 Subject: [PATCH] fix page title --- website/src/lib/components/Head.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/src/lib/components/Head.svelte b/website/src/lib/components/Head.svelte index 6050bbfe..4f6e84b9 100644 --- a/website/src/lib/components/Head.svelte +++ b/website/src/lib/components/Head.svelte @@ -5,6 +5,7 @@ import { _, isLoading } from 'svelte-i18n'; let location: string; + let title: string; $: if ($page.route.id) { location = $page.route.id; @@ -14,6 +15,7 @@ location = location.replace(`[...${param}]`, $page.params[param]); } }); + title = location.replace('/[...language]', '').split('/')[1] ?? 'home'; } @@ -35,11 +37,11 @@ content="View, edit and create GPX files online with advanced route planning capabilities and file processing tools, beautiful maps and detailed data visualizations." /> {:else} - gpx.studio — {$_(`metadata.${location}_title`)} + gpx.studio — {$_(`metadata.${title}_title`)} - + - + {/if}