Use server detected host for sharing URLs

This commit is contained in:
2020-03-28 12:48:59 +01:00
parent 3a4b1c2c85
commit fbdbe21dd6
5 changed files with 22 additions and 25 deletions

View File

@@ -32,7 +32,6 @@
pageTransition
} from '../../../utils/store'
import { formatDate, relativeTime, getThumbnail } from '../../../utils/functions'
const { page } = stores()
// Dependencies
import lazySizes from 'lazysizes'
@@ -54,6 +53,7 @@
// Props and variables
export let photos
const { page } = stores()
let layoutSetting
// Update current location
@@ -99,7 +99,7 @@
<title>{$site.seo_name} Beautiful houses of {location.name}, {location.country.name}</title>
<meta name="description" content="{$site.seo_name} {location.name} {location.description}">
<SocialMetas
url="https://housesof.world/location/{location.country.slug}/{location.slug}"
url="https://{$page.host}/location/{location.country.slug}/{location.slug}"
title="{$site.seo_name} Beautiful houses of {location.name}, {location.country.name}"
description="{$site.seo_name} {location.name} {location.description}"
image={latestPhoto ? getThumbnail(latestPhoto.image.private_hash, 1200, 630) : null}