Improve SEO
This commit is contained in:
@ -10,6 +10,7 @@ const translations: Record<TranslationKey, Record<string, string>> = {
|
|||||||
'albums': 'Alben',
|
'albums': 'Alben',
|
||||||
'photo': 'Foto',
|
'photo': 'Foto',
|
||||||
'photos': 'Fotos',
|
'photos': 'Fotos',
|
||||||
|
'photo-description': 'Foto von Luca Bosin',
|
||||||
'video': 'Video',
|
'video': 'Video',
|
||||||
'videos': 'Videos',
|
'videos': 'Videos',
|
||||||
'back': 'Zurück',
|
'back': 'Zurück',
|
||||||
@ -31,6 +32,7 @@ const translations: Record<TranslationKey, Record<string, string>> = {
|
|||||||
'albums': 'Albums',
|
'albums': 'Albums',
|
||||||
'photo': 'Photo',
|
'photo': 'Photo',
|
||||||
'photos': 'Photos',
|
'photos': 'Photos',
|
||||||
|
'photo-description': 'Photo by Luca Bosin',
|
||||||
'video': 'Video',
|
'video': 'Video',
|
||||||
'videos': 'Videos',
|
'videos': 'Videos',
|
||||||
'back': 'Back',
|
'back': 'Back',
|
||||||
|
|||||||
@ -2,13 +2,43 @@
|
|||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import '@fontsource/poppins';
|
import '@fontsource/poppins';
|
||||||
import '$lib/styles/base.css';
|
import '$lib/styles/base.css';
|
||||||
|
import { str, strf } from '$lib/data/language';
|
||||||
|
|
||||||
$: console.log($page.data);
|
$: metaTitle = ($page.data.title ?
|
||||||
|
$strf($page.data.title):
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
($page.data.album && $page.data.album.title ?
|
||||||
|
$strf($page.data.album.title):
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
($page.data.item ?
|
||||||
|
$page.data.item.title ?
|
||||||
|
$strf($page.data.item.title):
|
||||||
|
$page.data.item.item:
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
$str('gallery');
|
||||||
|
$: metaDescription = ($page.data.description ?
|
||||||
|
$strf($page.data.description):
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
($page.data.album && $page.data.album.description ?
|
||||||
|
$strf($page.data.album.description):
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
($page.data.item ?
|
||||||
|
$page.data.item.description ?
|
||||||
|
$strf($page.data.item.description):
|
||||||
|
$str('photo-description'):
|
||||||
|
null
|
||||||
|
) ||
|
||||||
|
$str('gallery-description');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$page.data.title || 'Galerie'} | bosin.ch</title>
|
<title>{metaTitle} | bosin.ch</title>
|
||||||
<meta name="description" content={$page.data.description || 'Fotogalerie von Luca Bosin'} />
|
<meta name="description" content={metaDescription} />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
Reference in New Issue
Block a user