A Quarto extension to embed tweets into an html document using a shortcode.
Install the extension with:
quarto install extension sellorm/quarto-twitter-embedTo embed a Tweet into your Quarto html document you can use the shortcode like this:
{{< tweet <username> <id> >}}or
{{< tweet user=<username> id=<id> >}}This second option is provided for compatibility with Hugo.
For example:
{{< tweet sellorm 1555267341327503367 >}}or
{{< tweet user=sellorm id=1555267341327503367 >}}You can obtain the username and status id of a tweet by clicking the "share tweet" button and choosing "copy URL".
This will give you a URL like this one: https://twitter.com/sellorm/status/1555267341327503367?s=21&t=M0M4IA_KW-zMY1rb2XOWZQ.
The "user" is the section between twitter.com/ and /status.
The status "id" is everything between status/ and ? or the end of the URL, whichever comes first.
See example.qmd for a full example.