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
What
Enables Material's social plugin so every page gets an auto-generated Open Graph / Twitter card image. Sharing a cpp-linter.github.io link 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:
Changes
Validation
The Deploy Documentation / build job runs on this PR with CARDS=true and 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 show docs/index.md — its content is identical to main (no functional change); only the three files above are real changes.
🤖 Generated with Claude Code
Generated by Claude Code