mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 15:43:25 +00:00
optional parameter for language, instead of rest parameter
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
location = location.replace(`[...${param}]`, $page.params[param]);
|
||||
}
|
||||
});
|
||||
title = location.replace('/[...language]', '').split('/')[1] ?? 'home';
|
||||
title = location.replace('/[[language]]', '').split('/')[1] ?? 'home';
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
<link
|
||||
rel="alternate"
|
||||
hreflang="x-default"
|
||||
href="https://gpx.studio{base}{location.replace('/[...language]', '')}"
|
||||
href="https://gpx.studio{base}{location.replace('/[[language]]', '')}"
|
||||
/>
|
||||
{#each Object.keys(languages) as lang}
|
||||
<link
|
||||
rel="alternate"
|
||||
hreflang={lang}
|
||||
href="https://gpx.studio{base}{location.replace('[...language]', lang)}"
|
||||
href="https://gpx.studio{base}{location.replace('[[language]]', lang)}"
|
||||
/>
|
||||
{/each}
|
||||
</svelte:head>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
import Nav from '$lib/components/Nav.svelte';
|
||||
import Footer from '$lib/components/Footer.svelte';
|
||||
|
||||
const appRoutes = ['/[...language]/app', '/[...language]/embed'];
|
||||
const appRoutes = ['/[[language]]/app', '/[[language]]/embed'];
|
||||
|
||||
$: showNavAndFooter = $page.route.id === null || !appRoutes.includes($page.route.id);
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user