Closed titogarrido closed 1 year ago
Hey @titogarrido, thanks for the issue.
Your problem is that you're not loading your project data server-side. The OG image only runs server side so it won't get your project data.
You can fix this simply by getting the project top-level.
<script setup>
const project = await getProject();
</script>
<template>
<OgImageDynamic
component="OgImageWithImage"
title="Hello world"
:image_path="project.full_cover"
/>
</template>
Do you mean I just need to move the Githubissues.
Details
Hi!
I have a nuxt 3 page that fetches a project data from an external API. This data includes a project cover that I want to set as my OGImage.
I will paste here some snippets and what I am doing:
I have created a Component on
@/components/islands/OgImageWithImage.vue
:The idea is to show my cover image as OGImage.
This is my resumed project component:
Now I am having trouble to pass this dynamic data to my OgImageDynamic. It does not show up on the "Options" section or it does not update to the fetched value.
What am I missing here?
Thanks!