Skip to content

Homepage emits og:type=article; should be website #1416

Description

Summary

The homepage serves og:type=article. The homepage should declare og:type=website for correct entity/social typing, which also aligns with the WebSite schema entity already emitted on the page.

Evidence

  • Live https://aspire.dev/ <head> contains <meta property="og:type" content="article"> (emitted by Starlight's DefaultHead).
  • The site already computes the correct value: resolveOgType() in src/frontend/src/utils/page-metadata.ts (lines ~156–178) returns 'website' for the home page and any template: splash page, and getOgMetadata() surfaces it as type.

Root cause / where the change goes

getOgMetadata().type is computed but never emitted, so Starlight's hardcoded og:type=article wins. The head-optimization middleware only upserts og:title and og:description:

  • src/frontend/src/route-data-middleware.tsoptimizeOpenGraphHead() (lines ~116–128) calls upsertMetaEntry(head, 'property', 'og:title', og.ogTitle) and ... 'og:description', og.description), but not og:type.

Fix by upserting the type in the same place:

upsertMetaEntry(head, 'property', 'og:type', og.type);

upsertMetaEntry replaces the existing head entry in place (matching on the property attribute), so no duplicate og:type tag is produced. This keeps the middleware as the single source of truth for OG head tags. (Emitting it directly in components/starlight/Head.astro would instead risk a duplicate tag alongside Starlight's default.)

Done when

  • Re-scrape / social debugger shows og:type=website on /, while docs/article pages still show article.
  • Optionally add a unit test asserting the og:type upsert for a home/splash route vs. an article route.

Source: SEO audit of https://aspire.dev/ (2026-07-29). Priority: Medium.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions