feat(website): social preview images and Open Graph tags for every page - #12
Merged
Merged
Conversation
A 1200x630 card per docs page and one for the landing page, rendered at build time with satori and resvg in the site's fonts and colors. Pages get og:image with size and alt text, twitter:card summary_large_image, twitter title, description and image, and article:modified_time on docs. Also keeps underscores inside identifiers in generated page descriptions (request_attention was rendered as requestattention).
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.
What
/og/home.png) and one for every docs page (/og/docs/guide/vault.png, …), rendered at build time with satori and resvg. They use the site's fonts and honeycomb theme and show the section, title, description, docs version and URL. When a new docs page is added, its image is generated automatically.og:image(plus secure_url, type, width, height, alt),twitter:card=summary_large_image, andtwitter:title,twitter:description,twitter:image. Docs pages also getarticle:modified_time. Starlight already emitsog:title,og:description,og:urlandog:type./og/*is served with a one-day cache.request_attentioncame out asrequestattention). Test added.Verified
bun run website:checkandastro buildpass. The build produces 22 images.