diff --git a/src/app.d.ts b/src/app.d.ts index b28d840..4abaddc 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -7,5 +7,9 @@ declare namespace App { // interface Locals {} // interface Platform {} // interface Session {} - // interface Stuff {} + interface Stuff { + title?: string; + description?: string; + keywords?: string[]; + } } diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index f8402f4..a0ff89f 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -16,16 +16,21 @@ { href: '/blog', label: 'Blog' }, { href: '/contact', label: 'Contact' }, ]; + $: wrappedTitle = $page.stuff.title + ? `${$page.stuff.title} - Alex Daichendt` + : "Alex Daichendt's website"; + $: description = $page.stuff.description; + $: keywords = $page.stuff.keywords; {$page.stuff.title} - AlexDaichendt - {#if $page.stuff.description} - + >{wrappedTitle} + {#if description} + {/if} - {#if $page.stuff.keywords} - + {#if keywords} + {/if}