astro-og-canvas icon indicating copy to clipboard operation
astro-og-canvas copied to clipboard

[Feature request]: Automatically generate Open Graph and Twitter meta tags and inject them into the <head> tag

Open RodrigoTomeES opened this issue 1 year ago • 0 comments

It would be fantastic if, upon exporting an Open Graph (OG) object, the necessary meta tags could be automatically added to the

tag. This feature would eliminate the need to pass it to the layout explicitly for inclusion.
// src/pages/index.astro

---
export const og: OGImageOptions = {
  title: 'Example Page',
  description: 'Description of this page shown in smaller text',
  logo: { path: './src/astro-docs-logo.png', size: [350] },
};
---

<Layout title="Welcome to Astro." description="Hellow world">
 Some cool stuffs!
</Layout>

RodrigoTomeES avatar Nov 22 '23 17:11 RodrigoTomeES