Skip to content

Add SEO and Open Graph meta tags to BaseLayout #138

@cadamsmith

Description

@cadamsmith

Problem

src/layouts/BaseLayout.astro currently sets only <title>, <meta charset>, and viewport. Missing:

  • <meta name="description">
  • Open Graph tags (og:title, og:description, og:image, og:url, og:type)
  • Twitter card tags (twitter:card, twitter:title, twitter:description, twitter:image)
  • Canonical URL (<link rel="canonical">)

This means link previews on Slack/Discord/LinkedIn/Twitter fall back to bare URL + title, and search engines have no description snippet to render.

Proposal

Extend BaseLayout to accept optional description and image props (with sensible defaults pulled from siteResources), and emit the full set of meta tags. Use Astro.url for canonical/og:url so it works across environments.

A static OG image (e.g., /images/og-cover.png, 1200×630) should be added to public/images/.

Acceptance

  • BaseLayout emits description, OG, Twitter, and canonical tags.
  • A default OG image exists in public/images/.
  • Verified with a link-preview debugger (e.g., opengraph.xyz or Slack unfurl) once deployed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions