summaryrefslogtreecommitdiffstats
path: root/docs/content/en/content-management/shortcodes.md
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2021-10-31 03:56:36 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-11-01 15:51:00 +0100
commit0cc39af68232f1a4981aae2e72cf65da762b5768 (patch)
treeda1c6a143d93544f5d9df2646128f2ae79ca7c3f /docs/content/en/content-management/shortcodes.md
parented6fd26ce884c49b02497728a99e90b92dd65f1f (diff)
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
Diffstat (limited to 'docs/content/en/content-management/shortcodes.md')
-rw-r--r--docs/content/en/content-management/shortcodes.md10
1 files changed, 5 insertions, 5 deletions
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" >}}
-{{</* tweet 877500564405444608 */>}}
+{{</* tweet user="SanDiegoZoo" id="1453110110599868418" */>}}
{{< /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`