Skip to content

Commit

Permalink
fix: log and disable cards feature when dependencies are not met
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Feb 22, 2024
1 parent ee8a648 commit 30b1d6c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/plugins/social/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ def on_config(self, config):

# Check dependencies
if "Image" not in globals():
raise PluginError(
log.exception(PluginError(
"Required dependencies of \"social\" plugin not found. "
"Install with: pip install \"mkdocs-material[imaging]\""
)

"Install with: pip install \"mkdocs-material[imaging]\". "
"Plugin has been disabled."
))
self.config.cards = False
return

# Move color options
if self.config.cards_color:

Expand Down

0 comments on commit 30b1d6c

Please sign in to comment.