Is it possible to get social cards to work with mkdocs-static-i18n? #5592
Replies: 2 comments 7 replies
-
From reading the source code, the mkdocs-static-i18n plugin seems to do a lot of legwork to bring other third-party plugins under its control. I'm not sure whether the social plugin requires the same thing. Guessing, I would say no, because the social plugin will just generate a social card for every page, and if you have two separate pages, those should be two separate social cards. Thus, it might be a better idea to ask the author of the mkdocs-static-i18n plugin, because from our side, it should work without problems. This should apply to the brand new social plugin that is distributed with Insiders, as well as to the version we currently have in the community edition. Feel free to come back if you gather any insights!
Definitely possible with the new social plugin! You can set the font in a custom social card template by examining the Alternatively, you can subscribe to #5567, in which it was already requested to change the social card template per page, albeit only in this comment. If you wish, you can open a PR that requests that functionality specifically. Otherwise, we'll add it anyway in the future. |
Beta Was this translation helpful? Give feedback.
-
You could check out my message here: #5359 (reply in thread) The big refactor was supposed to fix most of such issues, but the PR got stale, and I believe the author didn't want to accept other PRs before completing his work on it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Referring to this translation plugin here: https://github.com/ultrabug/mkdocs-static-i18n
Basically, the plugin allows you to place markdown files side by side (i.e.
index.md
for English andindex.ko.md
for Korean) and it will create a separate translated version of the page at a different link. However, when I try to set up social cards, it seems like the Korean translated social card is simply overwriting the English translated social card.I'm wondering if there is any workaround here that would allow me to create both an English social card and a Korean social card? Or any examples that you may know of to get it working?
Also, a similar question I have is whether it is possible to have the English translation use one Font, and Korean translation use a different font? Because my Korean social cards are not rendering properly with the current default font because it doesn't support Korean characters...
As a last resort, if none of this is possible, I'm wondering if there is a way to simply turn off social card rendering for the translations (i.e. just have them default to the English version, even though it is not ideal it is better than nothing).
Beta Was this translation helpful? Give feedback.
All reactions