diff --git a/tpl/template_embedded.go b/tpl/template_embedded.go index 5ae37a340..673907d00 100644 --- a/tpl/template_embedded.go +++ b/tpl/template_embedded.go @@ -47,6 +47,9 @@ func (t *GoHTMLTemplate) EmbedShortcodes() { `) t.AddInternalShortcode("gist.html", ``) + t.AddInternalShortcode("tweet.html", `{{ $user := index .Params 0 }} +{{ $tweet := index .Params 1 }} +{{ (getJSON "https://api.twitter.com/1/statuses/oembed.json?url=https://twitter.com/" $user "/status/" $tweet).html | safeHTML }}`) } func (t *GoHTMLTemplate) EmbedTemplates() {