Skip to content

seo: add structured data, social cards and the machine-readable surfaces - #10

Merged
ElianCodes merged 1 commit into
mainfrom
seo/structured-data-and-social-cards
Sep 28, 2026
Merged

ElianCodes merged 1 commit into
mainfrom
seo/structured-data-and-social-cards

Conversation

@ElianCodes

Copy link
Copy Markdown
Contributor

2 of 3. Stacked on #9 — review that first; this diff is against it, not main.

getcoral.dev@main already has all of this. It also publishes a
.well-known/api-catalog that names docs.getcoral.dev as its
service-doc
— and nothing here ever pointed back. This is a port, not an
invention.

What was missing

Verified against production before the change:

getcoral.dev docs.getcoral.dev
robots.txt 200, per-bot allows + Content-Signal 404
JSON-LD full @graph none
og:image per-page, generated none — while shipping twitter:card=summary_large_image
llms-full.txt 200 404
api-catalog names docs as service-doc no reciprocal

The og:image one is the quiet cost: every page declared a large-image card
with no image behind it, so every share anywhere rendered blank.

Added

  • src/lib/site.ts — URLs, names, sameAs. Nothing hardcodes a domain now.
  • src/lib/schema.ts — Organization, WebSite, TechArticle,
    BreadcrumbList, SoftwareApplication in one @graph. The Organization
    and WebSite @ids deliberately point at getcoral.dev, so a crawler
    resolves both hosts to one entity rather than two sharing a name.
    No aggregateRating: Google's software rich result effectively requires one,
    Coral has no real ratings, and inventing them is a manual action.
  • src/lib/modules.ts — the per-module facts the graph and cards need,
    carrying the Shipping/Early/Scaffold status from docs: describe the code that actually ships #9 through into JSON-LD and
    llms.txt, so a model reading this site cannot present a scaffold as
    finished.
  • src/components/Head.astro — Starlight had no head hook configured and
    no component overrides; this is the seam. It also moves the Google Fonts
    @import out of styles.css, where it blocked render, into a preconnect.
  • 17 OG cards, rasterised at build with sharp (already a dependency — no
    satori, no new packages). The text wrap now marks truncation with an ellipsis:
    docs descriptions run longer than the marketing taglines this started as, and
    a card stopping mid-sentence reads as broken rather than abbreviated.
  • robots.txt, llms-full.txt, reciprocal .well-known/api-catalog,
    and llms.txt pointed at its own domain instead of the marketing site's.
  • The 404 is now noindex and emits no graph. It was claiming to be a
    TechArticle about something.
  • The favicon was still Astro's stock sparkle. Replaced with the Coral mark,
    plus the icon set and a manifest. Dropped the unused houston.webp.

Verification

  • pnpm build clean. dist/ contains robots.txt, llms-full.txt,
    .well-known/api-catalog and 17 og.png.
  • Every page: exactly one valid application/ld+json block, og:image present,
    checked by parsing all 18 built HTML files.
  • OG cards inspected as images, not just as bytes.
  • Sitemap still 17 URLs; no og.png or /404 leaked into it.

@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 26, 2026 8:33pm UTC

The marketing site next door publishes a full JSON-LD graph, per-page OG
images, a robots.txt with per-bot allows, and an api-catalog that already names
docs.getcoral.dev as its service-doc. This site published none of it and never
pointed back. Ported from getcoral.dev@main rather than reinvented.

What was missing, verified against production before this change:

- robots.txt returned 404, so no Sitemap: directive was published anywhere and
  no crawler directives existed in either direction.
- No JSON-LD on any page.
- No og:image, while every page shipped twitter:card=summary_large_image — so
  every share rendered as a blank card.
- llms-full.txt 404'd, and llms.txt linked to the *marketing* domain's copy.

Added:

- src/lib/site.ts — URLs, names and sameAs in one place. Nothing hardcodes a
  domain now.
- src/lib/schema.ts — Organization, WebSite, TechArticle, BreadcrumbList and
  SoftwareApplication in a single @graph. The Organization and WebSite @ids
  deliberately point at getcoral.dev so both hosts resolve to one entity rather
  than two that share a name. No aggregateRating: Google's software rich result
  effectively requires one, Coral has no real ratings, and inventing them is a
  manual action.
- src/lib/modules.ts — the per-module facts the graph and cards need, including
  the Shipping/Early/Scaffold status, so a model reading this site cannot
  present a scaffold as a finished product.
- src/components/Head.astro — Starlight has no head hook configured and no
  component overrides; this is the seam. Also moves the Google Fonts @import out
  of styles.css, where it blocked render, into a preconnect plus link.
- One 1200x630 OG card per page, rasterised at build with sharp, which was
  already a dependency. The wrap now marks truncation with an ellipsis —
  documentation descriptions run longer than the marketing taglines this
  started as, and a card stopping mid-sentence reads as broken.
- llms-full.txt, a reciprocal .well-known/api-catalog, and a robots.txt whose
  Content-Signal sits inside its User-agent group, before Sitemap.
- The 404 page is now noindex and emits no graph — it was claiming to be a
  TechArticle about something.

Also replaces the favicon, which was still Astro's stock sparkle, with the
Coral mark, and drops the unused houston.webp.
@ElianCodes
ElianCodes force-pushed the seo/structured-data-and-social-cards branch from eb3930a to 1a5b19d Compare September 26, 2026 20:33
Base automatically changed from docs/truth-pass to main September 28, 2026 10:01
@ElianCodes
ElianCodes merged commit 966de89 into main Sep 28, 2026
2 checks passed
@ElianCodes
ElianCodes deleted the seo/structured-data-and-social-cards branch September 28, 2026 10:01

This branch was successfully deployed

1 active deployment
Preview — 1a5b19d8 Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant