Add SEO share images on remaining pages

This commit is contained in:
2022-09-21 16:32:23 +02:00
parent 730a6789eb
commit a51179f6f4
5 changed files with 20 additions and 7 deletions

View File

@@ -13,8 +13,9 @@
import relativeTime from 'dayjs/plugin/relativeTime'
import { stagger, timeline } from 'motion'
import { DELAY } from '$utils/contants'
import { quartOut } from '$animations/easings'
import { map, lerp, throttle } from '$utils/functions'
import { getAssetUrlKey } from '$utils/api'
import { quartOut } from '$animations/easings'
import { PUBLIC_FILTERS_DEFAULT_COUNTRY, PUBLIC_FILTERS_DEFAULT_SORT, PUBLIC_GRID_INCREMENT } from '$env/static/public'
// Components
import Metas from '$components/Metas.svelte'
@@ -34,7 +35,7 @@
let { photos, totalPhotos }: { photos: any[], totalPhotos: number } = data
$: ({ photos, totalPhotos } = data)
const { filteredCountryExists }: { totalPhotos: number, filteredCountryExists: boolean } = data
const { filteredCountryExists, settings }: { filteredCountryExists: boolean, settings: any } = data
const { countries, locations }: any = getContext('global')
dayjs.extend(relativeTime)
@@ -326,7 +327,7 @@
<Metas
title="{filterCountry === defaultCountry ? `All Photos` : `Photos of ${currentCountry.name}`} - Houses Of"
description="Discover {totalPhotos} homes from {filterCountry === defaultCountry ? `${locations.length} places of ${countries.length} countries in the World` : currentCountry.name}"
image=""
image={getAssetUrlKey(settings.seo_image_photos.id, 'share-image')}
/>
<svelte:window