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 title = "Alex Daichendt's website";
|
||||||
export let keywords: string[] = [];
|
export let keywords: string[] = [];
|
||||||
export let description: string;
|
export let description: string = '';
|
||||||
let seo = $page.data?.seo;
|
let seo = $page.data?.seo;
|
||||||
|
|
||||||
if (seo) {
|
if (seo) {
|
||||||
title = seo.title ? `${seo.title} - Alex Daichendt` : "Alex Daichendt's website";
|
title = seo.title ? `${seo.title} - Alex Daichendt` : "Alex Daichendt's website";
|
||||||
description = seo.description;
|
description = seo.description;
|
||||||
keywords = seo.keywords;
|
keywords = seo.keywords || [];
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head
|
<svelte:head
|
||||||
><title>{title}</title>
|
><title>{title}</title>
|
||||||
{#if description}
|
{#if description.length > 0}
|
||||||
<meta name="description" content={description} />
|
<meta name="description" content={description} />
|
||||||
{/if}
|
{/if}
|
||||||
<meta name="author" content="Alexander Daichendt" />
|
<meta name="author" content="Alexander Daichendt" />
|
||||||
{#if keywords}
|
{#if keywords.length > 0}
|
||||||
<meta name="keywords" content={keywords.join(',')} />
|
<meta name="keywords" content={keywords.join(',')} />
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue