Is Insider the only way to get different social cards / blog post? #7331
-
I'm interested in customizing the icon for different blog posts, and I was wondering if there was a way to accomplish this without Insider. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @johnsturgeon, mkdocs-material/material/plugins/social/config.py Lines 28 to 36 in 36e5263 However, since both MkDocs and the plugin are written in Python, everything is public, and you can monkey-patch functions with a hook or inside the CI before deployment you could inject other code into the plugin script file to change the behaviour. Only caveat of this is that the fancy multi-layer code was also introduced in Insiders, so depending on how much control you want over the positioning of the elements etc. you'd have to add a lot of the code. If you only want to change the logo on a certain social card then I guess EDIT: The first proposed idea will likely not work as the EDIT2: mkdocs-material/material/plugins/social/plugin.py Lines 250 to 281 in 36e5263 |
Beta Was this translation helpful? Give feedback.
Hello @johnsturgeon,
it depends on what are you after specifically. If you're asking about configuring the social cards layouts on the community version, then it's impossible, as the layouts were introduced in the Insiders version, so there is no easy straight-forward configuration for this.
mkdocs-material/material/plugins/social/config.py
Lines 28 to 36 in 36e5263