From 0a7e9d21bd3da9c50cd5487c6dbf6821085ab19d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 19 Aug 2023 14:42:44 +0200 Subject: [PATCH] Documentation --- docs/setup/setting-up-social-cards.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md index d0b06ccf9..15581f0e4 100644 --- a/docs/setup/setting-up-social-cards.md +++ b/docs/setup/setting-up-social-cards.md @@ -66,6 +66,20 @@ plugins: > generates images much more efficiently in parallel and allows to build > entirely [custom layouts]. +!!! info "The [`site_url`][site_url] setting must be set" + + Note that you must set [`site_url`][site_url] when using the social plugin, + or the generated cards will not be correctly linked. Social media services + like Twitter and Facebook demand that social previews point to an absolute + URL, which the plugin can only compute when [`site_url`][site_url] is set. + Example: + + ``` yaml + site_url: https://example.com + ``` + + [site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url + The following configuration options are available: [`enabled`](#+social.enabled){ #+social.enabled }