Closed cossssmin closed 2 months ago
Same with description
. Sorry if this is expected behavior, I just found it a little confusing.
This is the expected behaviour but you should be able to do explicit opt-outs such as:
defineOgImageComponent('OGWithCTA', {
button: 'Donate now',
title: false,
description: false,
})
Changing the behavior at this point would be too much of a breaking change otherwise.
Thanks Harlan, that'll do.
Just to be clear, this didn't previously work. I have just pushed up a fix for it though.
Describe the bug
It doesn't seem possible to conditionally render a prop named
title
in a component -nuxt-og-image
will automatically fallback to the page's title so a conditional check will always evaluate totrue
and will render the fallback (page) title.pages/donate.vue
components/OgImage/OGWithCTA.vue
Reproduction
No response
System / Nuxt Info
No response