jonasmerlin / astro-seo

Makes it easy to add information that is relevant for SEO to your Astro app.
MIT License
908 stars 50 forks source link

Displaying OG info #46

Closed djmtype closed 1 year ago

djmtype commented 1 year ago

While title and description print out just fine, using the following doesn't render any opengraph meta tags in Astro 1.6.9. What am I doing wrong?

<SEO
title={title ? title : `My title`}
description={description ? description : `My description`}
openGraph.basic.title={ogTitle ? ogTitle : `My OG title`}
openGraph.basic.type="website"
openGraph.basic.image="./images/og.jpg"
openGraph.basic.url="https://website.com"
/>
djmtype commented 1 year ago

Nevermind, figured it out. It has to be displayed as an object.

jonasmerlin commented 1 year ago

@djmtype Yes that's right. I added a more complete example with the latest release that should hopefully make that more clear for future users.