From b5c4cffedaf0c2a22dee6198e6dcc4f60f065a18 Mon Sep 17 00:00:00 2001 From: samaradel Date: Thu, 19 Aug 2021 15:23:55 +0200 Subject: [PATCH] test twitter meta --- src/templates/BlogPost.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/templates/BlogPost.vue b/src/templates/BlogPost.vue index 885e84806..04e62e380 100644 --- a/src/templates/BlogPost.vue +++ b/src/templates/BlogPost.vue @@ -242,6 +242,13 @@ export default { return image; }, }, + computed: { + metaImg() { + if (process.isClient) { + return window.location.origin + this.img(this.$page.blog.image); + } + }, + }, metaInfo() { return { title: "", @@ -265,8 +272,7 @@ export default { { key: "og:image", property: "og:image", - content: - `${window.location.origin}` + this.img(this.$page.blog.image), + content: this.metaImg(), }, { name: "twitter:description", @@ -276,8 +282,7 @@ export default { { name: "twitter:image", property: "twitter:image", - content: - `${window.location.origin}` + this.img(this.$page.blog.image), + content: this.metaImg(), }, { name: "twitter:title",