feat(social): generate Open Graph / social card images - #48
Closed
shenxianpeng wants to merge 1 commit into
Closed
Conversation
✅ Deploy Preview for cpp-linter-github-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Enable Material's social plugin so every page gets an auto-generated Open Graph / Twitter card image — links shared to GitHub/Slack/X now render a rich preview instead of a bare URL. Card generation needs native imaging libs (Cairo etc.), which aren't available in every build environment (e.g. Netlify PR previews). To keep those builds working, the plugin is gated behind a CARDS env var that defaults to false; only the GitHub Pages deploy — where the libs are installed — sets CARDS=true and actually renders the cards. - mkdocs.yml: add `social` plugin with `cards: !ENV [CARDS, false]` - docs/requirements.txt: mkdocs-material -> mkdocs-material[imaging] - deploy.yml: install imaging system deps and set CARDS=true for the build
shenxianpeng
force-pushed
the
claude/cpp-linter-org-gaps-z9fuep
branch
from
July 25, 2026 15:59
634e537 to
1fc25a8
Compare
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
Enables Material's social plugin so every page gets an auto-generated Open Graph / Twitter card image. Sharing a
cpp-linter.github.iolink to GitHub, Slack, X, etc. will render a rich preview card instead of a bare URL.Why gated behind an env var
Card generation needs native imaging libs (Cairo & friends), which aren't available in every build environment — notably Netlify PR previews (configured in Netlify's UI, no
netlify.toml). To avoid breaking those builds, the plugin is gated:deploy.yml) installs the imaging system libs and setsCARDS=true→ cards are generated for the published site.CARDSunset → cards are skipped → build still succeeds (previews just won't show the generated cards, which is fine for content review).Changes
mkdocs.yml— add thesocialplugin withcards: !ENV [CARDS, false].docs/requirements.txt—mkdocs-material→mkdocs-material[imaging]..github/workflows/deploy.yml— installlibcairo2-dev+ friends and setCARDS=truefor the build job.Validation
The Deploy Documentation / build job runs on this PR with
CARDS=trueand the imaging libs installed, so a green build here means card generation actually works (not just that the config parses).Note
This branch (
claude/cpp-linter-org-gaps-z9fuep) previously carried the squash-merged #47, so the diff may also showdocs/index.md— its content is identical tomain(no functional change); only the three files above are real changes.🤖 Generated with Claude Code
Generated by Claude Code