Skip to content

Commit

Permalink
feat: added og:image priority for article cover (#112)
Browse files Browse the repository at this point in the history
* feat: added og:image priority for article cover

* chore: no need to unref

---------

Co-authored-by: Sébastien Chopin <[email protected]>
  • Loading branch information
elkmod and atinux authored Feb 16, 2023
1 parent 853b250 commit 0aabd92
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions layouts/article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
const { page } = useContent()
const route = useRoute()
if (page.value && page.value.cover) {
useHead({
meta: [
{ property: 'og:image', content: page.value.cover }
]
})
}
const parentPath = computed(
() => {
const pathTabl = route.path.split('/')
Expand Down

0 comments on commit 0aabd92

Please sign in to comment.