fix: silence mkdocs social plugin warnings in strict mode#2109
Merged
Kludex merged 1 commit intomodelcontextprotocol:mainfrom Feb 19, 2026
Merged
fix: silence mkdocs social plugin warnings in strict mode#2109Kludex merged 1 commit intomodelcontextprotocol:mainfrom
Kludex merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
The social plugin (`mkdocs-material`) requires cairosvg for generating Open Graph social card images. This dependency was never included in the docs dependency group, so the plugin emitted a warning on every page. With strict mode enabled, these warnings aborted the build. Changes: - Add `mkdocs-material[imaging]` extra to the docs dependency group, which pulls in `cairosvg`, `cairocffi`, `cssselect2`, `defusedxml`, and `tinycss2`. This requires the system Cairo library (`libcairo2`), which is pre-installed on GitHub Actions ubuntu-latest runners. - Gate the social plugin behind an `ENABLE_SOCIAL_CARDS` env var (defaults to false) so local development does not require Cairo. - Set `ENABLE_SOCIAL_CARDS=true` in the docs publish workflow so social cards are generated for the published site.
Member
|
We should move away from mkdocs, maybe zensical? |
Kludex
approved these changes
Feb 19, 2026
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.
The social plugin (
mkdocs-material) requires cairosvg for generating Open Graph social card images. This dependency was never included in the docs dependency group, so the plugin emitted a warning on every page. With strict mode enabled, these warnings aborted the build.Changes:
mkdocs-material[imaging]extra to the docs dependency group, which pulls incairosvg,cairocffi,cssselect2,defusedxml, andtinycss2. This requires the system Cairo library (libcairo2), which is pre-installed on GitHub Actions ubuntu-latest runners.ENABLE_SOCIAL_CARDSenv var (defaults to false) so local development does not require Cairo.ENABLE_SOCIAL_CARDS=truein the docs publish workflow so social cards are generated for the published site.The other approach is to set
cards: falseon the social plugin inmkdocs.yml. According to Claude, that would disable social card generation (which is what requires cairosvg) but keep the plugin active for metadata. I don't have a strong preference.