From fd4928244645550916408f9cce2e54c4176b3d1b Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:52:22 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Add=20`x-twitter`=20sharing=20li?= =?UTF-8?q?nks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #809 --- CHANGELOG.md | 1 + config/_default/params.toml | 2 +- data/sharing.json | 5 +++++ exampleSite/content/docs/configuration/index.md | 2 +- i18n/ar.yaml | 1 + i18n/bg.yaml | 1 + i18n/bn.yaml | 1 + i18n/cs.yaml | 1 + i18n/de.yaml | 1 + i18n/en.yaml | 1 + i18n/es.yaml | 1 + i18n/fi.yaml | 1 + i18n/fr.yaml | 1 + i18n/he.yaml | 1 + i18n/hu.yaml | 1 + i18n/id.yaml | 1 + i18n/it.yaml | 1 + i18n/ja.yaml | 1 + i18n/ko.yaml | 1 + i18n/nl.yaml | 1 + i18n/pl.yaml | 1 + i18n/pt-BR.yaml | 1 + i18n/pt-PT.yaml | 1 + i18n/ro.yaml | 1 + i18n/ru.yaml | 1 + i18n/sk.yaml | 1 + i18n/tr.yaml | 1 + i18n/uk.yaml | 1 + i18n/zh-CN.yaml | 1 + i18n/zh-TW.yaml | 1 + 30 files changed, 34 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46eef99d..ffe49309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed +- `x-twitter` option missing when using sharing links ([#809](https://github.com/jpanther/congo/issues/809)) - Chinese default config contains incorrect `author` block name ([#807](https://github.com/jpanther/congo/pull/807)) - Links in articles are prefixed with a blank space ([#813](https://github.com/jpanther/congo/pull/813)) diff --git a/config/_default/params.toml b/config/_default/params.toml index fe0bc176..82c4d16e 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -51,7 +51,7 @@ fingerprintAlgorithm = "sha256" showTaxonomies = false showWordCount = false showComments = false - # sharingLinks = ["facebook", "twitter", "mastodon", "pinterest", "reddit", "linkedin", "email", "telegram", "line", "weibo"] + # sharingLinks = ["facebook", "x-twitter", "mastodon", "pinterest", "reddit", "linkedin", "email", "telegram", "line", "weibo"] [list] showBreadcrumbs = false diff --git a/data/sharing.json b/data/sharing.json index 692d507a..96afe8b9 100644 --- a/data/sharing.json +++ b/data/sharing.json @@ -34,6 +34,11 @@ "title": "sharing.twitter", "url": "https://twitter.com/intent/tweet/?url=%s&text=%s" }, + "x-twitter": { + "icon": "x-twitter", + "title": "sharing.x-twitter", + "url": "https://x.com/intent/tweet/?url=%s&text=%s" + }, "telegram": { "icon": "telegram", "title": "sharing.telegram", diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 3ae0f434..d3c85e89 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -162,7 +162,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |`article.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed.| |`article.showWordCount`|`false`|Whether or not article word counts are displayed.| |`article.showComments`|`false`|Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer.| -|`article.sharingLinks`|_Not set_|An array of sharing links to display at the end of each article. Valid options include `facebook`, `twitter`, `mastodon`, `pinterest`, `reddit`, `linkedin`, `email`, `telegram` and `line`. When not provided, or set to `false`, no links will be displayed.| +|`article.sharingLinks`|_Not set_|An array of sharing links to display at the end of each article. Valid options include `facebook`, `x-twitter`, `mastodon`, `pinterest`, `reddit`, `linkedin`, `email`, `telegram` and `line`. When not provided, or set to `false`, no links will be displayed.| |`list.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the header on list pages.| |`list.showTableOfContents`|`false`|Whether or not the table of contents is displayed on list pages.| |`list.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed on list pages.| diff --git a/i18n/ar.yaml b/i18n/ar.yaml index 802b8027..3feafc7b 100644 --- a/i18n/ar.yaml +++ b/i18n/ar.yaml @@ -54,6 +54,7 @@ sharing: telegram: "شارك على تيليجرام" line: "شارك على لاين" # weibo: "Share on Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "حديثًا" diff --git a/i18n/bg.yaml b/i18n/bg.yaml index cc7db846..fd918e0b 100644 --- a/i18n/bg.yaml +++ b/i18n/bg.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Споделете в Telegram" line: "Споделете в LINE" weibo: "Споделете в Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Последни" diff --git a/i18n/bn.yaml b/i18n/bn.yaml index 1501d7fb..f083e729 100644 --- a/i18n/bn.yaml +++ b/i18n/bn.yaml @@ -54,6 +54,7 @@ sharing: telegram: "টেলিগ্রামে শেয়ার করুন" line: "লাইনে শেয়ার করুন" # weibo: "Share on Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "সাম্প্রতিক" diff --git a/i18n/cs.yaml b/i18n/cs.yaml index cf8ac92e..43ba72eb 100644 --- a/i18n/cs.yaml +++ b/i18n/cs.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Sdílejte na Telegram" line: "Sdílejte na LINE" weibo: "Sdílejte na Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Nedávné" diff --git a/i18n/de.yaml b/i18n/de.yaml index c76516ca..ae27e95f 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Auf Telegram teilen" line: "Auf LINE teilen" weibo: "Auf Weibo teilen" + # x-twitter: "Post on X" shortcode: recent_articles: "Neue Beiträge" diff --git a/i18n/en.yaml b/i18n/en.yaml index 2d87eb71..630ed510 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Share on Telegram" line: "Share on LINE" weibo: "Share on Weibo" + x-twitter: "Post on X" shortcode: recent_articles: "Recent" diff --git a/i18n/es.yaml b/i18n/es.yaml index 0e078604..7665f5fd 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Compartir en Telegram" line: "Compartir en LINE" weibo: "Compartir en Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Reciente" diff --git a/i18n/fi.yaml b/i18n/fi.yaml index fb5fc6f6..de5a36c5 100644 --- a/i18n/fi.yaml +++ b/i18n/fi.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Jaa Telegramissa" line: "Jaa LINEssä" weibo: "Jaa Weibossä" + # x-twitter: "Post on X" shortcode: recent_articles: "Viimeaikaiset" diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 80471567..96b7eecc 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Partager sur Telegram" line: "Partager sur LINE" weibo: "Partager sur Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Articles récents" diff --git a/i18n/he.yaml b/i18n/he.yaml index 31177246..116b7188 100644 --- a/i18n/he.yaml +++ b/i18n/he.yaml @@ -54,6 +54,7 @@ sharing: telegram: "שיתוף בטלגרם" line: "שיתוף בליין" # weibo: "Share on Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "חדשים" diff --git a/i18n/hu.yaml b/i18n/hu.yaml index 7c3be8fe..fd884075 100644 --- a/i18n/hu.yaml +++ b/i18n/hu.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Megosztás a Telegramon" line: "Megosztás a LINE-on" weibo: "Megosztás a Weibo-on" + # x-twitter: "Post on X" shortcode: recent_articles: "Friss" diff --git a/i18n/id.yaml b/i18n/id.yaml index c3f7be07..574a745f 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Bagikan ke Telegram" line: "Bagikan ke LINE" weibo: "Bagikan ke Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Terbaru" diff --git a/i18n/it.yaml b/i18n/it.yaml index 2c3f4749..626ae017 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Condividi su Telegram" line: "Condividi su LINE" weibo: "Condividi su Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Recenti" diff --git a/i18n/ja.yaml b/i18n/ja.yaml index ecb2bdbc..2e91d8b6 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Telegramでシェアする" line: "LINEでシェアする" weibo: "Weiboでシェアする" + # x-twitter: "Post on X" shortcode: recent_articles: "最近の記事" diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 4f9bc20a..81d283e6 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Telegram에 공유하기" line: "LINE에 공유하기" weibo: "Weibo에 공유하기" + # x-twitter: "Post on X" shortcode: recent_articles: "최신 글" diff --git a/i18n/nl.yaml b/i18n/nl.yaml index a248b1b1..057600cc 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Deel op Telegram" line: "Deel op LINE" weibo: "Deel op Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Recent" diff --git a/i18n/pl.yaml b/i18n/pl.yaml index 1f947b56..b959a682 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Udostępnij na Telegram" line: "Udostępnij na LINE" weibo: "Udostępnij na Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Ostatnie" diff --git a/i18n/pt-BR.yaml b/i18n/pt-BR.yaml index b02b789a..5ba26dd3 100644 --- a/i18n/pt-BR.yaml +++ b/i18n/pt-BR.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Compartilhar pelo Telegram" line: "Compartilhar pelo LINE" weibo: "Compartilhar pelo weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Recente" diff --git a/i18n/pt-PT.yaml b/i18n/pt-PT.yaml index 03f01c14..c3e2aaad 100644 --- a/i18n/pt-PT.yaml +++ b/i18n/pt-PT.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Partilhar pelo Telegram" line: "Partilhar pelo LINE" weibo: "Partilhar pelo Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Recente" diff --git a/i18n/ro.yaml b/i18n/ro.yaml index 11ee46cf..1a681803 100644 --- a/i18n/ro.yaml +++ b/i18n/ro.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Trimite pe Telegram" line: "Trimite pe LINE" weibo: "Trimite pe Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Cele mai noi" diff --git a/i18n/ru.yaml b/i18n/ru.yaml index e8d5b7e3..2516b0e8 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -58,6 +58,7 @@ sharing: telegram: "Поделиться на Telegram" line: "Поделиться на LINE" weibo: "Поделиться на Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Последние" diff --git a/i18n/sk.yaml b/i18n/sk.yaml index dba1255b..652241a9 100644 --- a/i18n/sk.yaml +++ b/i18n/sk.yaml @@ -54,6 +54,7 @@ sharing: telegram: "Zdieľaj na Telegram" line: "Zdieľaj na LINE" weibo: "Zdieľaj na Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Nedávne" diff --git a/i18n/tr.yaml b/i18n/tr.yaml index 6e411eba..11bc478c 100644 --- a/i18n/tr.yaml +++ b/i18n/tr.yaml @@ -53,6 +53,7 @@ sharing: telegram: "Telegram'da paylaş" line: "LINE'da paylaş" weibo: "Weibo'da paylaş" + # x-twitter: "Post on X" shortcode: recent_articles: "Güncel" diff --git a/i18n/uk.yaml b/i18n/uk.yaml index bba84178..f9036d35 100644 --- a/i18n/uk.yaml +++ b/i18n/uk.yaml @@ -58,6 +58,7 @@ sharing: telegram: "Поширити на Telegram" line: "Поширити на LINE" weibo: "Поширити на Weibo" + # x-twitter: "Post on X" shortcode: recent_articles: "Недавні дописи" diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 3f974207..e7072c6c 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -53,6 +53,7 @@ sharing: telegram: "分享到 Telegram" line: "分享到 LINE" weibo: "分享到 微博" + # x-twitter: "Post on X" shortcode: recent_articles: "最近的文章" diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml index a60501b3..49f326ab 100644 --- a/i18n/zh-TW.yaml +++ b/i18n/zh-TW.yaml @@ -54,6 +54,7 @@ sharing: telegram: "分享到 Telegram" line: "分享到 LINE" weibo: "分享到 微博" + # x-twitter: "Post on X" shortcode: recent_articles: "最近的文章"