diff --git a/material/plugins/social/plugin.py b/material/plugins/social/plugin.py index 44bf24195..06b43714e 100644 --- a/material/plugins/social/plugin.py +++ b/material/plugins/social/plugin.py @@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]): page.meta["meta"] = meta + self._generate_meta(page, config) def on_post_build(self, config): + if not self.config.cards: + return + # Check for exceptions for promise in self._image_promises: promise.result() diff --git a/src/plugins/social/plugin.py b/src/plugins/social/plugin.py index 44bf24195..06b43714e 100644 --- a/src/plugins/social/plugin.py +++ b/src/plugins/social/plugin.py @@ -165,6 +165,9 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]): page.meta["meta"] = meta + self._generate_meta(page, config) def on_post_build(self, config): + if not self.config.cards: + return + # Check for exceptions for promise in self._image_promises: promise.result()