Skip to content

Commit 05e913d

Browse files
committed
Fix: Fixed the link for the twitter:image meta tag
1 parent 32592cb commit 05e913d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pages/blog/_blogpost.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
{
5959
hid: "twitter:image",
6060
name: "twitter:image",
61-
content: this.post.thumbnail
61+
content: this.imageURL
6262
}
6363
]
6464
};
@@ -72,6 +72,12 @@ export default {
7272
// Once the component is mounted, we need to run Prism again to highlight the code blocks
7373
mounted() {
7474
Prism.highlightAll();
75+
},
76+
computed: {
77+
// image will always return the correct URL for the thumbnail, both for development and once deployed
78+
imageURL: function() {
79+
return `${process.env.BASE_URL}${this.post.thumbnail}`
80+
}
7581
}
7682
};
7783
</script>

0 commit comments

Comments
 (0)