fix: seo errors
This commit is contained in:
parent
97acbbd226
commit
6157750cca
1 changed files with 4 additions and 4 deletions
|
|
@ -3,23 +3,23 @@
|
|||
|
||||
export let title = "Alex Daichendt's website";
|
||||
export let keywords: string[] = [];
|
||||
export let description: string;
|
||||
export let description: string = '';
|
||||
let seo = $page.data?.seo;
|
||||
|
||||
if (seo) {
|
||||
title = seo.title ? `${seo.title} - Alex Daichendt` : "Alex Daichendt's website";
|
||||
description = seo.description;
|
||||
keywords = seo.keywords;
|
||||
keywords = seo.keywords || [];
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head
|
||||
><title>{title}</title>
|
||||
{#if description}
|
||||
{#if description.length > 0}
|
||||
<meta name="description" content={description} />
|
||||
{/if}
|
||||
<meta name="author" content="Alexander Daichendt" />
|
||||
{#if keywords}
|
||||
{#if keywords.length > 0}
|
||||
<meta name="keywords" content={keywords.join(',')} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue