Update nuxt-og-image

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2023-12-29 02:41:02 +06:00
parent cf80a76601
commit e059d43fd5
27 changed files with 2688 additions and 885 deletions

View File

@@ -76,9 +76,13 @@ useHead({
],
})
defineOgImage({
title: data.value.title,
description: data.value.description,
// Generate OG Image
defineOgImageComponent('Test', {
headline: 'Greetings 👋',
title: data.value.title || '',
description: data.value.description || '',
link: data.value.ogImage,
})
</script>

View File

@@ -68,7 +68,15 @@ useHead({
titleTemplate: 'Riyad\'s Blog - %s',
})
defineOgImage()
// Generate OG Image
const siteData = useSiteConfig()
defineOgImage({
props: {
title: 'Archive',
description: 'Here you will find all the blog posts I have written & published on this site.',
siteName: siteData.url,
},
})
</script>
<template>