jonasmerlin / astro-seo

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

How can I add Schema / structured data with the help of Astro SEO? #73

Open concaption opened 1 year ago

concaption commented 1 year ago

I am unsure about weather astro-seo provides the capability of integrating structured data or schema in a website or not. If there is any way do let me know.

jonasmerlin commented 1 year ago

@concaption This is currently not supported as a stand-alone feature, but should be possible by using the meta tag extension feature (extend.meta and extend.link). Maybe have a look at those and see if they fit your use case.

ttmc commented 9 months ago

I had the same question at first, because Google does sometimes read and use other kinds of structured metadata/

However, I'm not sure this is a job for astro-seo, and here's an example of why:

Suppose I have a website with recipes (i.e. recipes explaining how to prepare food items). I might want to add some standardized metadata to each recipe page, such as this:

https://schema.org/Recipe

As you can see, that's a lot! And that metadata wouldn't necessarily go in the head tag, which is where the astro-seo SEO component goes. Better would be a specific component, or set of components, provided by a recipe-specific Astro integration.

Moreover, recipes aren't the only thing that has standardized metadata. If you browse around schema.org for a while, you'll be amazed.