Skip to content

audit: zero SEO/social metadata — no canonical, no Open Graph/Twitter card; site URL hardcoded in 4+ places #36

Description

@tkowalczyk

Evidence (verified on production 2026-06-12)

curl https://ogsfrompoly.com/ | grep -iE 'og:|canonical|twitter' → empty. src/layouts/Layout.astro emits only charset/viewport/description/favicon/generator/title.

Consequences for a site whose distribution is "get cited and shared":

  • No og:title/og:description/og:type/og:url and no twitter:card → links shared on X/Discord/Telegram (the prediction-market-native audience) unfurl as bare URLs.
  • No <link rel="canonical"> while both /statements/2026-05-31-weekly and /statements/2026-05-31-weekly/ return 200 (trailing-slash duplicate, verified) → split indexing.
  • astro.config.mjs sets no site, and https://ogsfrompoly.com is hardcoded independently in src/lib/feeds/collect.ts, src/pages/index.astro, src/pages/statements.md.ts, src/pages/dev/preview.astro.

TDD plan (failing tests first)

  1. src/lib/site/meta.ts (pure): buildPageMeta({ site, path, title, description, type }): { canonical: string; og: Record<string,string>; twitter: Record<string,string> }.
    Tests FIRST: canonical strips trailing slash (decide policy + set trailingSlash in astro config to match); og:type article for statement pages / website otherwise; twitter summary card; all URLs absolute on the configured site.
  2. Set site: "https://ogsfrompoly.com" in astro.config.mjs; replace hardcoded constants with Astro.site (pages) / a single src/lib/site/config.ts consumed by collect.ts (keeps feed generators pure).
  3. Render the meta in Layout.astro via a path (or Astro.url) prop; statement page passes type: "article".
  4. Optional follow-up (separate): og:image — needs a design decision, out of scope here.

Acceptance criteria

AC Test
buildPageMeta contract incl. canonical normalization unit
One source of truth for the site origin (grep: the literal appears once outside tests) grep -r "ogsfrompoly.com" src/ | wc check in PR
Pages emit canonical + OG + twitter tags curl after deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkAgent-grabbable: implementable without further inputenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions