const { data: post } = await useFetch(`/api/posts/${route.params.id}`, {
key: `/post/${route.params.id}`
})
useServerSeoMeta({
title: () => `${post.value.data?.title} - APP NAME`,
ogTitle: () => `${post.value.data?.title} - APP NAME`,
description: () => post.value.data?.content,
ogDescription: () => post.value.data?.content,
image: () =>
config.public.imagekitBaseURL +
post.value.data?.imagePath +
'&tr=w-1200,fo-auto,dpr-auto',
ogImage: () =>
config.public.imagekitBaseURL +
post.value.data?.imagePath +
'&tr=w-1200,fo-auto,dpr-auto',
twitterCard: 'summary_large_image'
})
const { data: post } = await useFetch(`/api/posts/${route.params.id}`, {
key: `/post/${route.params.id}`
})
useServerSeoMeta({
title: () => `${post.value.data?.title} - APP NAME`,
ogTitle: () => `${post.value.data?.title} - APP NAME`,
description: () => post.value.data?.content,
ogDescription: () => post.value.data?.content,
image: () =>
config.public.imagekitBaseURL +
post.value.data?.imagePath +
'&tr=w-1200,fo-auto,dpr-auto',
ogImage: () =>
config.public.imagekitBaseURL +
post.value.data?.imagePath +
'&tr=w-1200,fo-auto,dpr-auto',
twitterCard: 'summary_large_image'
})