ifiokjr / gatsby-plugin-next-seo

Gatsby Plugin Next SEO is a plug in that makes managing your SEO easier in Gatsby projects.
MIT License
195 stars 20 forks source link

ProductJsonLd `availability` and `itemCondition` aren't working. #64

Open Inambe opened 3 years ago

Inambe commented 3 years ago

Description

offers.availability and offers.itemCondition are not generating any code no matter what value I set it to.

I'm using this but in the front-end, after building, there's no mention of these properties. and Google tester warns that these properties are missing.

offers={{
    ...
    itemCondition: "http://schema.org/NewCondition",
    availability: "http://schema.org/InStock",
    ...
}}

Possible Fix

Have no idea.

Checklist

albatrocity commented 2 years ago

@Inambe I ran into this as well, and I think the documentation is a little misleading. The source reveals that these fields are typed to a specific enum. Basically just use InStock instead of http://schema.org/InStock, NewCondition instead of http://schema.org/NewCondition, etc. and they will be converted to the expected values.