Catch 22? social plugin is not installed #3177
-
I'm trying to set up social cards, disabling them for local builds usingan environment variable that is only: plugins:
- social:
cards: !ENV [MKDOCS_SOCIAL_CARDS, false] This is set to true in CI, and things seems to work. However, building this locally I get this:
Locally I don't have insiders, since it's an open source project and any contributor should be able to build docs. I don't need social cards then either. What am I not getting here? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 16 replies
-
Maybe I shouldn't say that things are working on CI. It doesn't crash, but I also see no social card meta data in the generated pages. Here's the site built: https://calva.io |
Beta Was this translation helpful? Give feedback.
-
I only install insiders in CI. Since my team mates and contributors can't instal insiders, I don't want to do that either locally, so that it works same for me as for them. |
Beta Was this translation helpful? Give feedback.
-
I had the same issue and the problem is with the versioning. I was using a older version of MKDocs Material (8.3.x) which doesn't have builtin support for socials. I had to run the following: pip install mkdocs-material mkdocs-material-extensions --upgrade
pip install pillow cairosvg --upgrade This updated all the dependencies and allowed it to use the plugin. You have to also have the latest version of Pillow since otherwise, you will get this error: AttributeError: 'ImageDraw' object has no attribute 'textbbox' I hope this helps. Let me know if you have any other issues. |
Beta Was this translation helpful? Give feedback.
-
FYI, I got an error like this and had to install the pip package mentioned at https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/#dependencies |
Beta Was this translation helpful? Give feedback.
I had the same issue and the problem is with the versioning. I was using a older version of MKDocs Material (8.3.x) which doesn't have builtin support for socials. I had to run the following:
This updated all the dependencies and allowed it to use the plugin.
You have to also have the latest version of Pillow since otherwise, you will get this error:
I hope this helps. Let me know if you have any other issues.