These are wrappers that make it easy to generate hugo shortcodes that make it easy to embed various types of media into your pages. You use from inline R code like:

This tweet announced the release of hugo 0.24:

`R embed_tweet("877500564405444608")`

embed_gist(username, id, filename = NULL)

embed_instagram(id, caption = TRUE)

embed_tweet(id, username = NULL)

embed_vimeo(id)

embed_youtube(id, autoplay = FALSE)

Arguments

username

GitHub/Twitter user name

id

A string giving the object id. You'll usually find this by inspecting the URL:

  • gist: https://gist.github.com/spf13/7896402 -> 7896402

  • instagram: https://www.instagram.com/p/BWNjjyYFxVx/ -> BWNjjyYFxVx

  • twitter: https://twitter.com/spf13/status/877500564405444608 -> 877500564405444608

  • vimeo: https://vimeo.com/channels/staffpicks/146022717 -> 146022717

  • youtube: https://www.youtube.com/watch?v=w7Ft2ymGmfc -> w7Ft2ymGmfc

filename

Pick single file from multiple file gist

caption

Show instagram caption?

autoplay

Automatically play youtube video?