From fc0e4fe6114e3bd94bc5f40339e4ea429ad577ba Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 18 Sep 2022 16:03:45 +0200 Subject: [PATCH] Documentation --- docs/setup/setting-up-social-cards.md | 95 ++++++++++----------------- 1 file changed, 35 insertions(+), 60 deletions(-) diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md index 8ccdbed00..a8cc194b5 100644 --- a/docs/setup/setting-up-social-cards.md +++ b/docs/setup/setting-up-social-cards.md @@ -95,71 +95,45 @@ The following configuration options are available: cards_font: Roboto ``` - !!! tip "Limitations of the default `Roboto` font" - The default font value `Roboto` has no support to CJK languages, - if you tend to have these characters in your page's title, - or your `site_name` and `site_description` is containing CJK letters, - you may switch to Noto family (`Noto Sans` or `Noto Serif`) which provides support to CJK languages, to avoid render error. + !!! question "Why do social cards render boxes for CJK languages?" - === "Simplified Chinese" - === "Sans Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Sans SC - ``` - - === "Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Serif SC - ``` - - === "Traditional Chinese" - === "Sans Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Sans TC - ``` - - === "Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Serif TC - ``` + Some fonts do not contain CJK characters, like for example the + [default font, `Roboto`][font.text]. In case your `site_name`, + `site_description`, or [page title] contain CJK characters, choose + another font from [Google Fonts] which comes with CJK characters, e.g. + one from the `Noto Sans` font family: + + === "Chinese (Simplified)" + + ``` yaml + plugins: + - social: + cards_font: Noto Sans SC + ``` + + === "Chinese (Traditional)" + + ``` yaml + plugins: + - social: + cards_font: Noto Sans TC + ``` === "Japanese" - === "Sans Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Sans JP - ``` - - === "Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Serif JP - ``` + + ``` yaml + plugins: + - social: + cards_font: Noto Sans JP + ``` === "Korean" - === "Sans Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Sans KR - ``` - - === "Serif Font" - ``` yaml - plugins: - - social: - cards_font: Noto Serif KR - ``` + + ``` yaml + plugins: + - social: + cards_font: Noto Sans KR + ``` [`cards_dir`](#+social.cards_dir){ #+social.cards_dir } @@ -181,6 +155,7 @@ The following configuration options are available: [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables [CSS color keywords]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords [Google Fonts]: https://fonts.google.com + [page title]: ../reference/index.md#setting-the-page-title #### Dependencies