feat: Add generated Open Graph images for docs pages - #769
Open
developerjamiu wants to merge 2 commits into
Open
feat: Add generated Open Graph images for docs pages#769developerjamiu wants to merge 2 commits into
developerjamiu wants to merge 2 commits into
Conversation
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.
Every docs page now gets a social card in the style of the serverpod.dev feature pages when its link is shared. Pages with an explicit
imagein frontmatter keep it.Screenshots
Creating endpoint methods

Database backups (Cloud)

Migrations

docs home

How it works
plugins/open-graph-images) renders a 1200x630 JPEG per unique card at build time: the feature-page gradient, the Serverpod logo, the page's sidebar icon, its title, and its description.sidebar_class_nameor the nearest sidebar category icon, mirroring the sidebar CSS. The numbered tutorial-step icons are swapped for semantic ones on cards, which adds one new icon SVG.DocItem/Metadatacomputes the same ID client-side, so no manifest is needed and identical cards dedupe across doc versions: 383 unique cards cover 1632 pages (about 30 MB of images).Verification
og:imageresolves to an emitted file, with zero broken references and zero orphaned files. The only pages without cards are the 404 page and redirect stubs.The second commit separately removes leftover Docusaurus template comments from
docusaurus.config.js.