defineOgImageComponent()
Define an og:image for the current page with type safety.
Introduction
The
Arguments
defineOgImageComponent(
component,
props,
options
)
component : The component to render as the og:image.props : The props to pass to the component.options : The options to use when generating the image. Same as the props for defineOgImage.
Example
export default defineOgImageComponent(
// component
'MyCustomComponent',
// props
{
title: 'Welcome to my site!'
},
// options
{
fonts: [
'CustomFont:400'
]
}
)
Did this page help you?