N
Nuxtβ€’6mo ago
hz2222

why is useSeoMeta not working?

I am trying to use dynamic values here is my code: onMounted(async () => { const response = await fetchData(/recipe/${recipeId}) recipe.value = response.data }) useSeoMeta({ title: "Best Cooking Site", meta: [{ name: "viewport", content: "width=device-width, initial-scale=1" }], ogTitle: recipeId, ogDescription: () => recipe.value?.attributes.description, ogImage: () => ${picUrl}/${recipe.value.attributes.picURL}, ogUrl: recipeId, twitterTitle: recipeId, twitterDescription: () => recipe.value?.attributes.description, twitterImage: () => ${picUrl}/${recipe.value.attributes.picURL}, twitterCard: "summary" })
3 Replies
manniL
manniLβ€’6mo ago
if you fetch data on moutned, they wont be part of the server-sent HTML πŸ™‚
hz2222
hz2222OPβ€’6mo ago
then how should i do it?
manniL
manniLβ€’6mo ago
use useFetch/useAsyncData πŸ™‚
Want results from more Discord servers?
Add your server