From 5532501043e409f023f7c35d532092f4bbd97935 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 22 Feb 2023 00:11:35 +0100 Subject: feat: Add meta description with default fallback --- src/i18n/en/index.ts | 3 +++ src/i18n/i18n-types.ts | 12 ++++++++++++ src/i18n/nb/index.ts | 3 +++ src/routes/+layout.svelte | 4 +++- 4 files changed, 21 insertions(+), 1 deletion(-) (limited to 'src') 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: { + /** + * A​u​r​o​r​a​k​l​i​n​i​k​k​e​n​ ​p​r​o​v​i​d​e​s​ ​c​e​t​a​m​i​n​e​ ​t​r​e​a​t​m​e​n​t​ ​f​o​r​ ​d​e​p​r​e​s​s​i​o​n​ ​i​n​ ​O​s​l​o + */ + description: string + } /** * G​o​ ​t​o​ ​b​o​o​k​i​n​g */ @@ -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"; - {$page.data.title || "auroraklinikken.no"} + {$page.data.title ?? "auroraklinikken.no"} {#each locales as l} {/each} +
-- cgit v1.3