mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 19:25:32 -04:00
if multiple of the same shortcode are used, only load scripts once
This commit is contained in:
5
layouts/shortcodes/tweet.html
Normal file
5
layouts/shortcodes/tweet.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- /* Modified from tpl/tplimpl/embedded/templates/shortcodes/twitter.html, minus script */ -}}
|
||||
|
||||
{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=1&omit_script=1" (index .Params 0) -}}
|
||||
{{- $json := getJSON $url -}}
|
||||
{{- $json.html | safeHTML -}}
|
Reference in New Issue
Block a user