microsoft / microsoft/aspire.dev

Homepage emits og:type=article; should be website

Open Beginner friendly
#1,416 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
MDX
Stars
195
Forks
87
Avg merge
1d 22h
Merged PRs (30d)
73

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/frontend/src/route-data-middleware.ts at optimizeOpenGraphHead(), then read resolveOgType() and getOgMetadata() in src/frontend/src/utils/page-metadata.ts. Add the missing og:type upsert alongside og:title and og:description, and verify that the homepage or splash route emits website while article pages remain article; add the optional unit test if the project’s test setup supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.