Repository navigation
Add social previews to every website page - #369
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Open Graph and Twitter metadata now exists on every published website page, and CI enforces it.
og:type,og:site_name,og:title,og:description,og:url,og:image(+ type/size/alt),twitter:card,twitter:title,twitter:imageandtwitter:image:alt, plus a matching canonical URL.<html lang="en"></html>tag is fixed.Headoverride (SocialHead.astro) that selects the card by route. The Starlight site description gives pages without frontmatter copy a realog:description.api-reference.html) gets the same metadata.scripts/check_website.pywalks every built HTML page and fails on missing/duplicate tags, relative or missing images, a non-1200x630 image, a canonical/og:urlmismatch, or a prominent route that falls back to the shared card.scripts/generate_social_cards.pyrenders 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.pypython scripts/build_website.pypython scripts/check_website.py(22 HTML pages, routes, assets and social previews valid)lang=en, styles intact.