Skip to content

❇️ [RZA-260211]: SEO: Implement structured SEO engine and Schema.org support #211

Description

@recursivezero

Summary

Our SEO foundation is already strong (canonical URLs, Open Graph, Twitter Cards, sitemap, RSS, manifest, centralized site configuration). The remaining work is to improve machine readability for search engines and AI systems by introducing a reusable SEO module and Schema.org support.

The goal is to centralize all SEO generation while avoiding duplication across pages.


Objectives

  • Add Schema.org (JSON-LD) support.
  • Centralize SEO logic.
  • Keep page components simple.
  • Generate metadata from a single source of truth ("siteConfig" + page metadata).
  • Improve AI discoverability.

Tasks

  1. Create SEO module

Create:

src/components/seo/
├── Schema.astro
├── schema.ts
├── seo.ts
├── types.ts
└── index.ts

Responsibilities:

  • Schema.astro

    • Render JSON-LD only.
    • Contain minimal logic.
  • schema.ts

    • Generate structured data objects.
  • seo.ts

    • Build canonical URLs.
    • Generate page titles.
    • Resolve Open Graph image.
    • Shared SEO helper functions.
  • types.ts

    • Shared SEO types.

  1. Add Schema.org support

Support the following schema types:

  • Organization
  • WebSite
  • WebPage
  • AboutPage
  • CollectionPage
  • BlogPosting / Article

Automatically select the appropriate schema based on page type.


  1. Introduce page type support

Extend page metadata with:

  • home
  • page
  • about
  • article
  • collection

Allow "BaseHead" to render the appropriate structured data automatically.


  1. Update BaseHead

Replace inline SEO generation with reusable helpers.

Responsibilities should be limited to rendering:

  • Title
  • Description
  • Canonical
  • Open Graph
  • Twitter
  • Schema component

  1. Improve site configuration

Extend "siteConfig" with:

  • site URL
  • logo URL
  • optional social profile URLs

Use this as the single source of truth for SEO.


  1. Fix robots meta tag

Replace:

with:

(or remove the tag if default indexing behavior is desired).


  1. Improve global description

Replace the generic site description with one that accurately reflects the existing functionality of the site.


  1. Fix theme-color

Replace the invalid value:

with the site's actual primary color.


  1. Improve Open Graph metadata

Use the complete page title for:

  • "og:title"
  • "twitter:title"

instead of only the page title.


Expected Result

  • Reusable SEO architecture.
  • Automatic Schema.org generation.
  • Better search engine understanding.
  • Better AI discoverability.
  • Minimal maintenance for future pages.
  • No duplicated SEO logic across the project.

Acceptance Criteria

  • SEO module created.
  • Schema.org implemented.
  • Organization schema on homepage.
  • WebSite schema on homepage.
  • WebPage schema on all pages.
  • AboutPage schema on "/about".
  • BlogPosting schema on blog articles.
  • CollectionPage schema on listing pages.
  • Robots meta corrected.
  • Theme color corrected.
  • Global description improved.
  • BaseHead simplified.
  • All structured data validates successfully using Google's Rich Results Test and Schema Markup Validator.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions