From 1451a3ff50e521ce86382220161214eed76517d2 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:46:10 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Update=20built-in=20Hugo=20short?= =?UTF-8?q?code=20refs=20to=20remove=20deprecated=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ config/_default/config.toml | 12 ++++++++++++ exampleSite/config/_default/config.toml | 12 ++++++++++++ exampleSite/content/docs/shortcodes/index.md | 8 ++++---- .../content/samples/rich-content/index.de.md | 8 -------- .../content/samples/rich-content/index.es.md | 8 -------- .../content/samples/rich-content/index.ja.md | 8 -------- .../content/samples/rich-content/index.md | 18 +++++++++++------- .../samples/rich-content/index.zh-Hans.md | 8 -------- 9 files changed, 41 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eab8f6b..3cf234f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - New `gist` shortcode as the built-in Hugo version has been deprecated - New icon for `kofi` ([#976](https://github.com/jpanther/congo/pull/976)) +- Privacy and Services params in bundled `config.toml` to provide sensible defaults for built-in Hugo shortcodes ### Changed @@ -21,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Minor documentation errors and omissions ([#985](https://github.com/jpanther/congo/pull/985), [#1005](https://github.com/jpanther/congo/pull/1005), [#1007](https://github.com/jpanther/congo/pull/1007)) +- References to deprecated `twitter` shortcodes and replaced them with `x` ## [2.10.0] - 2024-12-06 diff --git a/config/_default/config.toml b/config/_default/config.toml index e1aa49d..bc3f630 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -13,3 +13,15 @@ summaryLength = 0 [outputs] home = ["HTML", "RSS", "JSON"] + +[privacy] + [privacy.vimeo] + enableDNT = true + [privacy.x] + enableDNT = true + [privacy.youTube] + privacyEnhanced = true + +[services] + [services.x] + disableInlineCSS = true diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index b4564f1..b774f07 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -13,3 +13,15 @@ summaryLength = 0 [outputs] home = ["HTML", "RSS", "JSON"] + +[privacy] + [privacy.vimeo] + enableDNT = true + [privacy.x] + enableDNT = true + [privacy.youTube] + privacyEnhanced = true + +[services] + [services.x] + disableInlineCSS = true diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 02e4844..bc3b872 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -25,8 +25,8 @@ By default, the alert is presented with an exclaimation triangle icon. To change **Warning!** This action is destructive! {{}} -{{}} -Don't forget to [follow me](https://twitter.com/jpanther) on Twitter. +{{}} +Don't forget to [follow me](https://x.com/jpanther) on X. {{}} ``` @@ -34,8 +34,8 @@ Don't forget to [follow me](https://twitter.com/jpanther) on Twitter. **Warning!** This action is destructive! {{< /alert >}}   -{{< alert "twitter" >}} -Don't forget to [follow me](https://twitter.com/jpanther) on Twitter. +{{< alert "x-twitter" >}} +Don't forget to [follow me](https://x.com/jpanther) on X. {{< /alert >}} ## Badge diff --git a/exampleSite/content/samples/rich-content/index.de.md b/exampleSite/content/samples/rich-content/index.de.md index d11f4ec..84a57e7 100644 --- a/exampleSite/content/samples/rich-content/index.de.md +++ b/exampleSite/content/samples/rich-content/index.de.md @@ -16,14 +16,6 @@ Hier ist ein Beispiel des mitgelieferten `youtube`-Shortcodes. {{< youtube ZJthWmvUzzc >}} -## Twitter - -Dieses Beispiel verwendet den Shortcode `twitter_simple`, um einen Tweet anzuzeigen. Er benötigt zwei benannte Parameter `user` und `id`. - -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} - -Alternativ kann der Shortcode `tweet` verwendet werden, um eine vollständig formatierte Twitter-Kachel einzubetten. - ## Vimeo Der Shortcode `vimeo_simple` bettet ein Video von Vimeo ein. diff --git a/exampleSite/content/samples/rich-content/index.es.md b/exampleSite/content/samples/rich-content/index.es.md index 654098f..77deb6c 100644 --- a/exampleSite/content/samples/rich-content/index.es.md +++ b/exampleSite/content/samples/rich-content/index.es.md @@ -16,14 +16,6 @@ A continuación, se muestra un ejemplo que utiliza el shortcut integrado `youtub {{< youtube ZJthWmvUzzc >}} -## Twitter - -Este ejemplo usa el shortcode `twitter_simple` para generar un Tweet. Requiere dos parámetros por nombre: `usuario` e `id`. - -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} - -Alternativamente, el shortcut `tweet` se puede usar para incrustar una tarjeta completa de Twitter. - ## Vimeo El shortcode `vimeo_simple` insertará un video de Vimeo. diff --git a/exampleSite/content/samples/rich-content/index.ja.md b/exampleSite/content/samples/rich-content/index.ja.md index 4f6be71..9027ef2 100644 --- a/exampleSite/content/samples/rich-content/index.ja.md +++ b/exampleSite/content/samples/rich-content/index.ja.md @@ -16,14 +16,6 @@ Hugoには、リッチコンテンツのためのいくつかの[組み込みシ {{< youtube ZJthWmvUzzc >}} -## Twitter - -この例では `twitter_simple` ショートコードを使っています。 `user` と `id` の2つの名前付きパラメーターが必要です。 - -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} - -`tweet` ショートコードを使えば、完全にマークアップされたTwitterカードを埋め込むこともできます。 - ## Vimeo `vimeo_simple` ショートコードでVimeoの動画を埋め込むことができます。 diff --git a/exampleSite/content/samples/rich-content/index.md b/exampleSite/content/samples/rich-content/index.md index c0e408f..f9d8fb8 100644 --- a/exampleSite/content/samples/rich-content/index.md +++ b/exampleSite/content/samples/rich-content/index.md @@ -12,20 +12,24 @@ Hugo ships with several [built-in shortcodes](https://gohugo.io/content-manageme ## YouTube -Below is an example using the built-in `youtube` shortcode. +Below is an example using the built-in `youtube` shortcode. It requires only the video ID. {{< youtube ZJthWmvUzzc >}} -## Twitter +## X (formerly Twitter) -This example uses the `twitter_simple` shortcode to output a Tweet. It requires two named parameters `user` and `id`. +This example uses the `x` shortcode to output a Tweet. It requires two named parameters `user` and `id`. -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}} -Alternatively, the `tweet` shortcode can be used to embed a fully marked up Twitter card. +## Instagram + +The `instagram` shortcode will embed an Instagram post. It requires only the post ID. + +{{< instagram CxOWiQNP2MO >}} ## Vimeo -The `vimeo_simple` shortcode will embed a Vimeo video. +The `vimeo` shortcode will embed a Vimeo video. It requires only the video ID. -{{< vimeo_simple 48912912 >}} +{{< vimeo 48912912 >}} diff --git a/exampleSite/content/samples/rich-content/index.zh-Hans.md b/exampleSite/content/samples/rich-content/index.zh-Hans.md index d6065b6..6765371 100644 --- a/exampleSite/content/samples/rich-content/index.zh-Hans.md +++ b/exampleSite/content/samples/rich-content/index.zh-Hans.md @@ -16,14 +16,6 @@ Hugo包含了多个[内置短代码](https://gohugo.io/content-management/shortc {{< youtube ZJthWmvUzzc >}} -## Twitter - -这个例子使用了 `twitter_simple` 短代码来输出一条推文。它需要两个命名参数 `user` 和 `id`。 - -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} - -或者,可以使用 `tweet` 短代码来嵌入一个完全标记的Twitter卡片。 - ## Vimeo `vimeo_simple` 短代码将嵌入Vimeo视频。