From 0cc39af68232f1a4981aae2e72cf65da762b5768 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 31 Oct 2021 03:56:36 -0700 Subject: Update Twitter shortcode oEmbed endpoint The existing endpoint will be retired and removed on November 23, 2021. References: - https://twittercommunity.com/t/consolidating-the-oembed-functionality/154690 - https://developer.twitter.com/en/docs/twitter-for-websites/oembed-api#Embedded This is a backward compatible change. The existing endpoint requires a single parameter: the id of the tweet. The new endpoint requires two parameters: the id of the tweet, and the user with whom it is associated. For the moment, if you supply the wrong user, the request will be redirected (with a small delay) to the correct user/id pair. This behavior is undocumented, but we will take advantage of it as Hugo site authors transition to the new syntax. {{< tweet 1453110110599868418 >}} --> works, throws warning, deprecate at some point {{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} --> new syntax Fixes #8130 --- docs/content/en/content-management/related.md | 2 +- docs/content/en/content-management/shortcodes.md | 10 +++++----- docs/content/en/showcase/letsencrypt/index.md | 2 +- docs/content/en/troubleshooting/faq.md | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/content/en') diff --git a/docs/content/en/content-management/related.md b/docs/content/en/content-management/related.md index c0728fe99..a42cec32e 100644 --- a/docs/content/en/content-management/related.md +++ b/docs/content/en/content-management/related.md @@ -123,7 +123,7 @@ toLower This feature has been in the back log and requested by many for a long time. The development got this recent kick start from this Twitter thread: -{{< tweet 898398437527363585 >}} +{{< tweet user="scott_lowe" id="898398437527363585" >}} Scott S. Lowe removed the "Related Content" section built using the `intersect` template function on tags, and the build time dropped from 30 seconds to less than 2 seconds on his 1700 content page sized blog. diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md index 7d271041b..013532ce4 100644 --- a/docs/content/en/content-management/shortcodes.md +++ b/docs/content/en/content-management/shortcodes.md @@ -310,15 +310,15 @@ Assuming that standard Hugo pretty URLs are turned on. You want to include a single tweet into your blog post? Everything you need is the URL of the tweet: ``` -https://twitter.com/spf13/status/877500564405444608 +https://twitter.com/SanDiegoZoo/status/1453110110599868418 ``` #### Example `tweet` Input -Pass the tweet's ID from the URL as a parameter to the `tweet` shortcode: +Pass the tweet's user (case-insensitive) and id from the URL as parameters to the `tweet` shortcode. {{< code file="example-tweet-input.md" >}} -{{}} +{{}} {{< /code >}} #### Example `tweet` Output @@ -326,14 +326,14 @@ Pass the tweet's ID from the URL as a parameter to the `tweet` shortcode: Using the preceding `tweet` example, the following HTML will be added to your rendered website's markup: {{< output file="example-tweet-output.html" >}} -{{< tweet 877500564405444608 >}} +{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} {{< /output >}} #### Example `tweet` Display Using the preceding `tweet` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. -{{< tweet 877500564405444608 >}} +{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} ### `vimeo` diff --git a/docs/content/en/showcase/letsencrypt/index.md b/docs/content/en/showcase/letsencrypt/index.md index 8487a3c77..fc57a26b8 100644 --- a/docs/content/en/showcase/letsencrypt/index.md +++ b/docs/content/en/showcase/letsencrypt/index.md @@ -9,7 +9,7 @@ byline: "[bep](https://github.com/bep), Hugo Lead" The **Let’s Encrypt website** has a common set of elements: A landing page and some other static info-pages, a document section, a blog, and a documentation section. Having it moved to Hugo was mostly motivated by a _simpler administration and Hugo's [multilingual support](/content-management/multilingual/)_. They already serve HTTPS to more than 60 million domains, and having the documentation available in more languages will increase that reach.[^1] -{{< tweet 971755920639307777 >}} +{{< tweet user="letsencrypt" id="971755920639307777" >}} I helped them port the site from Jekyll to Hugo. There are usually very few surprises doing this. I know Hugo very well, but working on sites with a history usually comes up with something new. diff --git a/docs/content/en/troubleshooting/faq.md b/docs/content/en/troubleshooting/faq.md index 66ea78630..6e90bd0d4 100644 --- a/docs/content/en/troubleshooting/faq.md +++ b/docs/content/en/troubleshooting/faq.md @@ -37,7 +37,7 @@ How to automate the "publish at intervals" part depends on your situation: Also see this Twitter thread: -{{< tweet 962380712027590657 >}} +{{< tweet user="ChrisShort" id="962380712027590657" >}} [^date-hierarchy]: See [Configure Dates](https://gohugo.io/getting-started/configuration/#configure-dates) for the order in which the different date variables are complemented by each other when not explicitly set. -- cgit v1.2.3