Astro Metadata Lab
Test cases for HTML metadata, social previews, favicons and theming
Tests how real browsers and messaging apps show page titles, link previews, favicons and theme colours, to pick sound defaults for an Astro starter.
Home page of Astro Metadata Lab


Drag the handle to compare light and dark.Left: your scheme. Right: the other one.


Drag the handle to compare light and dark.Left: your scheme. Right: the other one.
Facts
- Role
- Creator
- Kind
- research
- Status
- in active development
- Site
- astro-metadata-lab.cevdet.ch
- Lighthouse
- Performance 100 · Accessibility 100 · Best practices 100 · SEO 100,measured by PageSpeed Insights on the home page (mobile; performance the best of 5 runs, the rest the median), 21 November 2026
- Repository
- cevdetch/astro-metadata-lab
- Licence
- MIT
- Active
- October 2026 to November 2026
- Commits
- 24
Stack
Highlights
- Built 121 static test cases covering metadata precedence, canonicals, icons, head parsing, theming, manifests, JSON-LD, language and HTTP status.
- Recorded browser, link-preview and HTTP observations from real clients in a shared run registry, keeping documented platform contracts separate from observed client behaviour.
- Turned the results into the metadata defaults of the Astro Minimal Template.
| Metric | Value | Measured | Source |
|---|---|---|---|
| Metadata test cases | 121 | 24 October 2026 | Astro Metadata Lab README |
| Cases with recorded observations | 71 of 121 | 24 October 2026 | Astro Metadata Lab README coverage |
Problem
Advice on what belongs in a page’s <head> is easy to find and hard to verify. Whether a messaging app falls back to the HTML title when Open Graph text is missing, whether an SVG works as a share image, or which icon a browser picks from several candidates depends on the client, and documentation rarely says. Before deciding what a minimal Astro starter should emit by default, those questions needed answers from actual clients.
Constraints
- Each case had to be an independent page, viewable on its own for favicon, first-paint and mobile viewport observations that an iframe cannot show.
- Values had to be distinguishable at a glance. In the precedence cases, HTML, Open Graph, Twitter card and body text each carry a different marker and image colour, so a preview shows which source a client used.
- Observations come from real browsers and apps on available devices, reported by hand, so every record states what was and was not observed.
- The site is static, with no client JavaScript bundle, and deploys to Cloudflare Pages with the host rules that the HTTP controls need.
Decisions
- The catalogue gives every fixture three views: its own page, a side-by-side comparison with the baseline homepage and a plain-text view of its source.
- Some fixtures are controls meant to fail: broken images, conflicting tags, duplicate canonicals, a script-end injection in JSON-LD, a real 404, a 302 redirect and a header-only
noindex, so each failure mode can be checked on a real page instead of assumed. - Each case has a results page, and a shared run registry records which client produced each observation. The records keep a documented requirement of the Open Graph protocol or Google’s guidance apart from what a client happened to show.
- Checks on the built site verify every case, source and comparison output, the exact fixture HTML, asset bytes, manifest paths, host rules and the absence of a client bundle, including under a subpath.
Results
Each result links to the case records behind it; the results index lists every case and the run that produced each observation.
- Write Open Graph text explicitly. With only
og:titleremoved, Discord showed neither a title nor a description, and with onlyog:descriptionremoved it dropped the description, while two other messaging apps filled the missing field from the HTML (og-no-title, og-no-description). With no Open Graph tags at all, Discord did show the HTML title and description (html-only). The recommendation became one shared title and description feeding both the HTML and the Open Graph text. - Three tag removals showed no visible effect. Removing
og:type,og:urlor the image dimension tags caused no reported visible change in any of the four messaging apps tested or in LinkedIn’s Post Inspector (no-og-type, no-og-url, image-without-dimensions).og:typeandog:urlstay for protocol conformance; the agreed default leaves the dimension tags out. - Prefer an absolute PNG share image. A root-relative image showed in four of the five previews tested (four messaging apps and LinkedIn’s Post Inspector), and an SVG image only in Instagram (image-relative, image-svg). A missing image produced no image in the other three and a stand-in in Discord (“Image failed to load”) and Instagram (image-missing). Generated images default to 1200×630 PNG.
- Escape JSON-LD. In Firefox, the unsafe control failed to parse, injected an image element and set its runtime flag, while the escaped control parsed with the markup-like text kept as a string (jsonld-unsafe, jsonld-escaped).
- Build checks alone missed a dev-only failure. A strict trailing-slash policy made an extensionless asset endpoint reject file URLs in the dev server while the static build emitted the right files; a regression check now exercises Astro’s dev route matching (design notes).
- Clients cut text at different lengths, so the recommendation keeps full escaped strings and gives writing guidance instead of silent truncation (long-title).
- LinkedIn’s post composer and direct messages showed no preview. Post Inspector rendered titles and images but never a description (all-fields).
- The Astro Minimal Template ships these defaults: one title and description for both the HTML and the Open Graph text,
og:typeandog:urlwithout dimension tags, a generated 1200×630 PNG, untruncated text and escaped JSON-LD.
Next
- The first round of observations is recorded for the clients that were available. Testing the clients unavailable in this round, X and Facebook Messenger, against the same precedence cases is a possible follow-up.
- Diagnosing why LinkedIn’s post composer and direct messages showed no preview, which the Inspector results did not explain, remains open.
- Record the cases that have no observations yet, every manifest case among them, plus the extended hosted HTTP checks and the remaining browser combinations, such as a 48px ICO result and a light-mode theming report.