diff options
| -rw-r--r-- | src/i18n/en/index.ts | 3 | ||||
| -rw-r--r-- | src/i18n/i18n-types.ts | 12 | ||||
| -rw-r--r-- | src/i18n/nb/index.ts | 3 | ||||
| -rw-r--r-- | src/routes/+layout.svelte | 4 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/i18n/en/index.ts b/src/i18n/en/index.ts index 1f8260f..c358cc1 100644 --- a/src/i18n/en/index.ts +++ b/src/i18n/en/index.ts @@ -7,6 +7,9 @@ const en = { emailTitle: "Email", phoneTitle: "Phone", }, + meta: { + description: "Auroraklinikken provides cetamine treatment for depression in Oslo" + }, goToBookingPage: "Go to booking", ourServices: "Our services", homeTitle: "Home", diff --git a/src/i18n/i18n-types.ts b/src/i18n/i18n-types.ts index 52b1fd2..c04e615 100644 --- a/src/i18n/i18n-types.ts +++ b/src/i18n/i18n-types.ts @@ -32,6 +32,12 @@ type RootTranslation = { */ phoneTitle: string } + meta: { + /** + * Auroraklinikken provides cetamine treatment for depression in Oslo + */ + description: string + } /** * Go to booking */ @@ -65,6 +71,12 @@ export type TranslationFunctions = { */ phoneTitle: () => LocalizedString } + meta: { + /** + * Auroraklinikken provides cetamine treatment for depression in Oslo + */ + description: () => LocalizedString + } /** * Go to booking */ diff --git a/src/i18n/nb/index.ts b/src/i18n/nb/index.ts index 0064639..24cf2c6 100644 --- a/src/i18n/nb/index.ts +++ b/src/i18n/nb/index.ts @@ -7,6 +7,9 @@ const nb = { emailTitle: "E-postadresse", phoneTitle: "Telefon", }, + meta: { + description: "Auroraklinikken tilbyr ketaminbehandling mot depresjon i Oslo" + }, goToBookingPage: "Gå til bestilling", ourServices: "Våre tjenester", homeTitle: "Hjem", diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 97aa8cf..4ff2293 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -4,14 +4,16 @@ import { locales, baseLocale } from "$i18n/i18n-util"; import { replaceLocaleInUrl } from "$lib/utils"; import Header from "./parts/header.svelte"; + import LL from "$i18n/i18n-svelte"; </script> <svelte:head> - <title>{$page.data.title || "auroraklinikken.no"}</title> + <title>{$page.data.title ?? "auroraklinikken.no"}</title> {#each locales as l} <link rel="alternate" hreflang={l} href={`${replaceLocaleInUrl($page.url, l, true)}`} /> {/each} <link rel="alternate" hreflang="x-default" href={`${replaceLocaleInUrl($page.url, baseLocale, true)}`} /> + <meta name="description" content={$page.data.metaDescription ?? $LL.meta.description()}> </svelte:head> <Header /> |
