From 5532501043e409f023f7c35d532092f4bbd97935 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Wed, 22 Feb 2023 00:11:35 +0100
Subject: feat: Add meta description with default fallback

---
 src/routes/+layout.svelte | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/routes/+layout.svelte')

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 />
-- 
cgit v1.3

