From 4befaf0566ab89b3039a4c2149d6c7f40f796f6f Mon Sep 17 00:00:00 2001 From: Marc Portier Date: Tue, 8 Aug 2023 12:03:31 +0200 Subject: [PATCH] make the social sharing links dynamically reflect entries in the _config.yml --- _includes/gitbook-sharing.json.tpl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/_includes/gitbook-sharing.json.tpl b/_includes/gitbook-sharing.json.tpl index f571e15031..42e3d87144 100644 --- a/_includes/gitbook-sharing.json.tpl +++ b/_includes/gitbook-sharing.json.tpl @@ -1,13 +1,28 @@ "sharing": { - "all": ["facebook", "google", "twitter", "weibo", "instapaper", "github", "telegram"], "facebook": true, + "google": false, + "github": true, + {% if site.github_username %} + "github_link": "https://github.com/{{ site.github_username }}", + {% else %} "github_link": "https://github.com", + {% endif %} + "telegram": false, "telegram_link": "https://t.me", + "instapaper": false, + "twitter": true, + {% if site.twitter_username %} + "twitter_link": "https://twitter.com/{{ site.twitter_username }}", + {% endif %} + "vk": false, - "weibo": false + + "weibo": false, + + "all": ["facebook", "google", "twitter", "weibo", "instapaper", "github", "telegram"] },