Viewer: Coordinate page title and metas

This commit is contained in:
2020-03-29 19:35:02 +02:00
parent 7f155d495f
commit 9a8d201f7e

View File

@@ -60,7 +60,7 @@
let windowWidth
let gotoLink
let currentPhoto = photos.find(photo => photo.slug === $page.params.photo)
let pageTitle = ($currentLocation) ? `Photos of ${$currentLocation.name}, ${$currentLocation.country.name}` : ''
let pageTitle = ($currentLocation) ? `Beautiful homes of ${$currentLocation.name}, ${$currentLocation.country.name}` : ''
// Update store current location
if (!$currentLocation) currentLocation.set($locations.find(loc => loc.slug === $page.params.place))
@@ -93,7 +93,7 @@
<meta name="description" content="{$site.seo_name} {$currentLocation.name} {$currentLocation.description}">
<SocialMetas
url="https://{$page.host}/viewer/{currentPhoto.location.country.slug}/{currentPhoto.location.slug}/{currentPhoto.slug}"
title="{$site.seo_name} - Beautiful homes of {$currentLocation.name}, {$currentLocation.country.name}"
title="{$site.seo_name} - {pageTitle}"
description="{$site.seo_name} {$currentLocation.name} {$currentLocation.description}"
image={getThumbnail(currentPhoto.image.private_hash, 1200, 630)}
/>