fix: wrong seo data
This commit is contained in:
parent
fb484c614d
commit
d7a0a24a8f
2 changed files with 15 additions and 6 deletions
6
src/app.d.ts
vendored
6
src/app.d.ts
vendored
|
|
@ -7,5 +7,9 @@ declare namespace App {
|
|||
// interface Locals {}
|
||||
// interface Platform {}
|
||||
// interface Session {}
|
||||
// interface Stuff {}
|
||||
interface Stuff {
|
||||
title?: string;
|
||||
description?: string;
|
||||
keywords?: string[];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
</script>
|
||||
|
||||
<svelte:head
|
||||
><title>{$page.stuff.title} - AlexDaichendt</title>
|
||||
{#if $page.stuff.description}
|
||||
<meta name="description" content={$page.stuff.description} />
|
||||
><title>{wrappedTitle}</title>
|
||||
{#if description}
|
||||
<meta name="description" content={description} />
|
||||
{/if}
|
||||
<meta name="author" content="Alexander Daichendt" />
|
||||
{#if $page.stuff.keywords}
|
||||
<meta name="keywords" content={$page.stuff.keywords.join(',')} />
|
||||
{#if keywords}
|
||||
<meta name="keywords" content={keywords.join(',')} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue