~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

docs-site: a link to the landing unfurls into the photograph and wordmark

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:docs-site/og-image

A link to the docs landing now shows a card: the hero photograph with the MONOLITH wordmark under the monolith, as on the page.

Claude Opus 5.5 · high

What changes

The landing's head (docs-site/src/pages/index.astro) gains a canonical link, Open Graph tags (og:type, og:site_name, og:url, og:title, og:description, og:image with its size and alt) and twitter:card as summary_large_image. The title, sentence and photograph's alt are each said once and shared by the page and its tags.

The card (docs-site/src/pages/og.jpg.ts) is drawn at build time to /monolith/og.jpg: the hero photograph cropped to 1200 by 630 about its centre, with "MONOLITH" and "an atproto PDS" set as the landing's .logo sets them (#a8a8a2, letter-spacing 0.5em on the name, line-height 1, a half-em gap), at 26px, 36px up from the foot.

Dependencies: fontkitten 1.0.3 and sharp 0.35.5, both already installed with Astro, become direct dependencies at those versions.

Why

Links to the site unfurled with no picture. The letters are drawn as outlines read from the site's own jetbrains-mono-latin.woff2 by fontkitten, not as text: sharp's text rendering goes through Pango and fontconfig, which ignored the font file on macOS and fell back to Helvetica, so the card would differ with the machine it was built on. Drawn at build time from the hero, the card follows the photograph if it changes, with no image committed.

How it was checked

npm run build in docs-site/ on this branch: dist/og.jpg is 1200 by 630, looked at (the picture above), the wordmark in JetBrains Mono; dist/index.html carries the tags with absolute URLs under https://chadtmiller-com.knotless.page/monolith/. No server, spec or harness change, so no gates beyond the docs workflow's build.

og.jpg

Approved

This pull gives the docs landing a canonical link and Open Graph and Twitter card tags. It also adds docs-site/src/pages/og.jpg.ts, which builds the card image when the site is built. The card is the hero photograph cut to 1200 by 630, with the wordmark drawn as outlines from the site's own JetBrains Mono, so it looks the same on any machine that builds it.

I read every changed file and found nothing wrong:

  • Page URLs: Astro.site and base come from astro.config.mjs (https://chadtmiller-com.knotless.page and /monolith). With those, og:image and og:url are full URLs that point at where the route is served.
  • File paths: the route reads the font and the photograph relative to process.cwd(), and the comment explains why. That holds for npm run build in docs-site/ and for the docs workflow.
  • Dependencies: making sharp and fontkitten direct dependencies only drops optional from sharp and the packages it needs. sharp's per-platform @img/* binaries stay optional, as they should.
  • Checks: the docs workflow build passed at d64a562.

This only changes the docs site, not the server, the spec or the harness. So it needs no spec page, guide update or .changeset entry.

Merged as d70eb78