# Hugo Shortcodes

One of the delights of using blogdown to create blogs or websites is that it allows access to Hogo shortcodes which automatically create an HTML snippet based on the parameters you provide. You can even create your own, if you are up to it

Here are a few examples for use in RMarkdown. Check out the blogdown package and Hugo documentation for more detail

## Youtube

I tend to use the vembedr package but this is an alternative

library(blogdown)
shortcode("youtube", "e6GQBzRkc1A")

## Speakerdeck

Shout out to Jenny Bryan for posting slides for her 20+ talks. Here is one of them


shortcode("speakerdeck", "8d8ba68c2ba14d42954fa2c96cf8bd5d")

Use the arrow keys to move through the slides

## Twitter

I have resisted the obvious (DJT) and gone for Mara Averick as she does a great job at highlighting R news and developments plus providing amusing Police Reports.

This code samples a random tweet from the most recent 200 in her time-line


library(rtweet)
ma <- get_timeline("dataandme", n = 200)
shortcode("tweet", ma\$status_id[sample(1:200, 1, rep=FALSE)])
Share Comments
comments powered by Disqus