Skip to content

Add social previews to every website page - #369

Merged
athNdev merged 1 commit into
mainfrom
feat/social-previews
Nov 6, 2026
Merged

athNdev merged 1 commit into
mainfrom
feat/social-previews

Conversation

@athNdev

@athNdev athNdev commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

Open Graph and Twitter metadata now exists on every published website page, and CI enforces it.

  • Every page carries og:type, og:site_name, og:title, og:description, og:url, og:image (+ type/size/alt), twitter:card, twitter:title, twitter:image and twitter:image:alt, plus a matching canonical URL.
  • Dedicated 1200x630 cards for the pages most likely to be shared directly:
    • documentation home
    • introduction
    • Docker Compose getting started
    • API reference
    • design system
  • Everything else (FAQ, configuration, guides, changelog, versions, contributing, troubleshooting, 404 and the rest) keeps the shared Carbon Panel card, so no share renders bare.
  • Design system page gains the full metadata set, a canonical URL and JSON-LD, and its malformed <html lang="en"></html> tag is fixed.
  • Docs now use a Starlight Head override (SocialHead.astro) that selects the card by route. The Starlight site description gives pages without frontmatter copy a real og:description.
  • API reference page (api-reference.html) gets the same metadata.
  • Enforcement: scripts/check_website.py walks every built HTML page and fails on missing/duplicate tags, relative or missing images, a non-1200x630 image, a canonical/og:url mismatch, or a prominent route that falls back to the shared card.
  • Regeneration: scripts/generate_social_cards.py renders the dedicated cards from the shared layout with the vendored Inter and JetBrains Mono faces.

Validation

  • python -m unittest scripts.test_website scripts.test_landing_page scripts.test_design_system_page (17 pass)
  • python scripts/check_brand_assets.py
  • python scripts/build_website.py
  • python scripts/check_website.py (22 HTML pages, routes, assets and social previews valid)
  • Opened the built design-system page in a browser: all 16 tags present, lang=en, styles intact.

Every published page now declares the Open Graph and Twitter metadata set, and the website check fails when one is missing. Prominent routes get dedicated 1200x630 cards rendered from the shared layout; every other page keeps the Carbon Panel card.
@athNdev
athNdev merged commit c378d91 into main Nov 6, 2026
12 checks passed
@athNdev
athNdev deleted the feat/social-previews branch November 6, 2026 20:59
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