Skip to content

Commit 0aabd92

Browse files
elkmodSébastien Chopin
andauthored
feat: added og:image priority for article cover (#112)
* feat: added og:image priority for article cover * chore: no need to unref --------- Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
1 parent 853b250 commit 0aabd92

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

layouts/article.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
const { page } = useContent()
2727
const route = useRoute()
2828
29+
if (page.value && page.value.cover) {
30+
useHead({
31+
meta: [
32+
{ property: 'og:image', content: page.value.cover }
33+
]
34+
})
35+
}
36+
2937
const parentPath = computed(
3038
() => {
3139
const pathTabl = route.path.split('/')

0 commit comments

Comments
 (0)